File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 26
26
# define SYS_futex SYS_futex_time64
27
27
#endif
28
28
29
+ #elif defined(__FreeBSD__)
30
+
31
+ #include < sys/types.h>
32
+ #include < sys/umtx.h>
33
+
29
34
#else // <- Add other operating systems here
30
35
31
36
// Baseline needs no new headers
@@ -72,6 +77,22 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
72
77
const_cast <__cxx_atomic_contention_t *>(__ptr), 0 );
73
78
}
74
79
80
+ #elif defined(__FreeBSD__)
81
+
82
+ static void __libcpp_platform_wait_on_address (__cxx_atomic_contention_t const volatile * __ptr,
83
+ __cxx_contention_t __val)
84
+ {
85
+ _umtx_op (const_cast <__cxx_atomic_contention_t *>(__ptr),
86
+ UMTX_OP_WAIT_UINT_PRIVATE, __val, NULL , NULL );
87
+ }
88
+
89
+ static void __libcpp_platform_wake_by_address (__cxx_atomic_contention_t const volatile * __ptr,
90
+ bool __notify_one)
91
+ {
92
+ _umtx_op (const_cast <__cxx_atomic_contention_t *>(__ptr),
93
+ UMTX_OP_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, NULL , NULL );
94
+ }
95
+
75
96
#else // <- Add other operating systems here
76
97
77
98
// Baseline is just a timed backoff
You can’t perform that action at this time.
0 commit comments