|
| | atomic_futex (const uint32_t data) |
| | 构造函数
|
| MSTL_NODISCARD MSTL_ALWAYS_INLINE uint32_t | load (const memory_order mo) const |
| | 原子加载数据
|
| MSTL_ALWAYS_INLINE uint32_t | load_when_not_equal (const uint32_t value, const memory_order mo) |
| | 等待直到值不等于指定值
|
| MSTL_ALWAYS_INLINE void | load_when_equal (const uint32_t value, const memory_order mo) |
| | 等待直到值等于指定值
|
| template<typename Rep, typename Period> |
| MSTL_ALWAYS_INLINE bool | load_when_equal_for (const uint32_t value, const memory_order mo, const duration< Rep, Period > &rtime) |
| | 在指定时间内等待值等于指定值
|
| template<typename Clock, typename Dur> |
| MSTL_ALWAYS_INLINE bool | load_when_equal_until (const uint32_t value, const memory_order mo, const time_point< Clock, Dur > &atime) |
| | 在指定时间点前等待值等于指定值(通用时钟)
|
| template<typename Dur> |
| MSTL_ALWAYS_INLINE bool | load_when_equal_until (const uint32_t value, const memory_order mo, const time_point< system_clock, Dur > &atime) |
| | 在指定时间点前等待值等于指定值(系统时钟)
|
| template<typename Dur> |
| MSTL_ALWAYS_INLINE bool | load_when_equal_until (const uint32_t value, const memory_order mo, const time_point< steady_clock, Dur > &atime) |
| | 在指定时间点前等待值等于指定值(单调时钟)
|
| MSTL_ALWAYS_INLINE void | store_notify_all (const uint32_t value, const memory_order mo) |
| | 存储新值并通知所有等待线程
|
template<
uint32_t WaiterBit = 0x80000000>
class atomic_futex< WaiterBit >
原子快速用户态互斥锁类模板
- 模板参数
-
| WaiterBit | 等待者标志位,默认为0x80000000 |
基于FUTEX实现的用户态互斥锁, 提供高效的线程同步机制,减少不必要的上下文切换。
在文件 atomic_futex.hpp 第 31 行定义.