14#ifndef BOOST_FAIRNESS_WAIT_OPS_LINUX_HPP
15#define BOOST_FAIRNESS_WAIT_OPS_LINUX_HPP
18#include <linux/futex.h>
19#include <sys/syscall.h>
24 template<
typename T,
typename K>
25 inline void wait_(T& mem, K expected){
26 static_assert(
sizeof(T) == 4,
"Invalid argument size on boost::fairness::detail::wait");
27 syscall(SYS_futex, &mem, FUTEX_WAIT_PRIVATE, expected,
nullptr,
nullptr, 0);
32 static_assert(
sizeof(T) == 4,
"Invalid argument size on boost::fairness::detail::notify_one");
33 syscall(SYS_futex, &mem, FUTEX_WAKE_PRIVATE, 1,
nullptr,
nullptr, 0);
38 static_assert(
sizeof(T) == 4,
"Invalid argument size on boost::fairness::detail::notify_all");
39 syscall(SYS_futex, &mem, FUTEX_WAKE_PRIVATE, INT_MAX,
nullptr,
nullptr, 0);
This file contains configurations about boost and 128bit cpu support. TODO.
Definition coherent_priority_lock.hpp:25
void wait_(T &mem, K expected)
Definition wait_ops_generic.hpp:22
void notify_one_(T &mem)
Definition wait_ops_generic.hpp:31
void notify_all_(T &mem)
Definition wait_ops_generic.hpp:40