MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
futex.hpp
浏览该文件的文档.
1#ifndef MSTL_CORE_ASYNC_FUTEX_HPP__
2#define MSTL_CORE_ASYNC_FUTEX_HPP__
3
11
14
20
27#ifdef MSTL_PLATFORM_WINDOWS__
28 long;
29#else
30 int;
31#endif
32
42template <typename T>
43MSTL_INLINE17 constexpr bool platform_wait_valid_v = is_scalar_v<T>
44 && sizeof(T) == sizeof(platform_wait_t)
45 && alignof(T*) >= alignof(platform_wait_t);
46
65
66
77void MSTL_API futex_wait(void* addr, platform_wait_t value) noexcept;
78
101bool MSTL_API
103 bool has_timeout, int64_t sec, int64_t ns,
104 bool is_monotonic = false);
105
116void MSTL_API futex_notify(void* addr, bool all) noexcept;
117 // Futex
119
121#endif // MSTL_CORE_ASYNC_FUTEX_HPP__
long long int64_t
64位有符号整数类型
void MSTL_API futex_notify(void *addr, bool all) noexcept
通知等待的线程
int platform_wait_t
平台等待类型别名
bool MSTL_API futex_wait_until(void *addr, platform_wait_t value, bool has_timeout, int64_t sec, int64_t ns, bool is_monotonic=false)
等待FUTEX直到指定时间点或条件满足
futex_wait_flags
FUTEX操作标志枚举
MSTL_INLINE17 constexpr bool platform_wait_valid_v
检查类型是否适用于平台等待操作
void MSTL_API futex_wait(void *addr, platform_wait_t value) noexcept
无限期等待FUTEX
@ private_flag
私有标志位
@ bitset_match_any
匹配任何等待集合的位掩码
@ wake
唤醒操作
@ wake_bitset_private
私有位集唤醒操作
@ wait
等待操作
@ wait_bitset_private
私有位集等待操作
@ wake_private
私有唤醒操作
@ wake_bitset
位集唤醒操作
@ wait_bitset
位集等待操作
@ wait_private
私有等待操作
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL
MSTL类型萃取