LLVM OpenMP 20.0.0git
|
Base class for wait/release atomic flag. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/openmp/runtime/src/kmp_wait_release.h"
Public Types | |
typedef flag_traits< FlagType > | traits_type |
typedef PtrType | flag_t |
Public Types inherited from kmp_flag< FlagType > | |
typedef flag_traits< FlagType > | traits_type |
Public Member Functions | |
kmp_flag_atomic (std::atomic< PtrType > *p) | |
kmp_flag_atomic (std::atomic< PtrType > *p, kmp_info_t *thr) | |
kmp_flag_atomic (std::atomic< PtrType > *p, PtrType c) | |
kmp_flag_atomic (std::atomic< PtrType > *p, PtrType c, std::atomic< bool > *sloc) | |
std::atomic< PtrType > * | get () |
void * | get_void_p () |
void | set (std::atomic< PtrType > *new_loc) |
PtrType | load () |
void | store (PtrType val) |
bool | done_check () |
bool | done_check_val (PtrType old_loc) |
bool | notdone_check () |
void | internal_release () |
PtrType | set_sleeping () |
void | unset_sleeping () |
bool | is_sleeping_val (PtrType old_loc) |
bool | is_sleeping () |
Test whether there are threads sleeping on the flag. | |
bool | is_any_sleeping () |
kmp_uint8 * | get_stolen () |
Public Member Functions inherited from kmp_flag< FlagType > | |
kmp_flag () | |
kmp_flag (int nwaiters) | |
kmp_flag (std::atomic< bool > *sloc) | |
flag_type | get_type () |
kmp_info_t * | get_waiter (kmp_uint32 i) |
param i in index into waiting_threads | |
kmp_uint32 | get_num_waiters () |
void | set_waiter (kmp_info_t *thr) |
enum barrier_type | get_bt () |
Protected Attributes | |
std::atomic< PtrType > * | loc |
Pointer to flag location to wait on. | |
PtrType | checker = (PtrType)0 |
Flag==checker means it has been released. | |
Protected Attributes inherited from kmp_flag< FlagType > | |
flag_properties | t |
"Type" of the flag in loc | |
kmp_info_t * | waiting_threads [1] = {nullptr} |
kmp_uint32 | num_waiting_threads |
Num threads sleeping on this thread. | |
std::atomic< bool > * | sleepLoc |
Base class for wait/release atomic flag.
Definition at line 235 of file kmp_wait_release.h.
typedef PtrType kmp_flag_atomic< PtrType, FlagType, Sleepable >::flag_t |
Definition at line 241 of file kmp_wait_release.h.
typedef flag_traits<FlagType> kmp_flag_atomic< PtrType, FlagType, Sleepable >::traits_type |
Definition at line 240 of file kmp_wait_release.h.
|
inline |
Definition at line 242 of file kmp_wait_release.h.
|
inline |
Definition at line 243 of file kmp_wait_release.h.
References kmp_flag< FlagType >::waiting_threads.
|
inline |
Definition at line 247 of file kmp_wait_release.h.
|
inline |
Definition at line 249 of file kmp_wait_release.h.
|
inline |
Definition at line 262 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::checker, KMP_BARRIER_SLEEP_STATE, kmp_flag_atomic< PtrType, FlagType, Sleepable >::load(), and kmp_flag< FlagType >::sleepLoc.
|
inline |
old_loc | in old value of flag |
Definition at line 270 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::checker.
|
inline |
Definition at line 252 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::loc.
Referenced by kmp_flag_atomic< PtrType, FlagType, Sleepable >::internal_release(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::set_sleeping(), and kmp_flag_atomic< PtrType, FlagType, Sleepable >::unset_sleeping().
|
inline |
Definition at line 318 of file kmp_wait_release.h.
|
inline |
Definition at line 254 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::loc, and RCAST.
|
inline |
Definition at line 279 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::get(), and KMP_ATOMIC_ADD.
|
inline |
Definition at line 313 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_sleeping_val(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::load(), and kmp_flag< FlagType >::sleepLoc.
|
inline |
Test whether there are threads sleeping on the flag.
Definition at line 308 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_sleeping_val(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::load(), and kmp_flag< FlagType >::sleepLoc.
|
inline |
old_loc | in old value of flag Test whether there are threads sleeping on flag's old value in old_loc. |
Definition at line 302 of file kmp_wait_release.h.
References KMP_BARRIER_SLEEP_STATE, and kmp_flag< FlagType >::sleepLoc.
Referenced by kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_any_sleeping(), and kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_sleeping().
|
inline |
Definition at line 258 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::loc.
Referenced by kmp_flag_atomic< PtrType, FlagType, Sleepable >::done_check(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_any_sleeping(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::is_sleeping(), and kmp_flag_atomic< PtrType, FlagType, Sleepable >::notdone_check().
|
inline |
Definition at line 276 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::checker, and kmp_flag_atomic< PtrType, FlagType, Sleepable >::load().
|
inline |
new_loc | in set loc to point at new_loc |
Definition at line 256 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::loc.
|
inline |
Definition at line 283 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::get(), KMP_ATOMIC_OR, KMP_BARRIER_SLEEP_STATE, and kmp_flag< FlagType >::sleepLoc.
|
inline |
val | the new flag value to be stored |
Definition at line 260 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::loc, and val.
|
inline |
Definition at line 293 of file kmp_wait_release.h.
References kmp_flag_atomic< PtrType, FlagType, Sleepable >::get(), KMP_ATOMIC_AND, KMP_BARRIER_SLEEP_STATE, and kmp_flag< FlagType >::sleepLoc.
|
protected |
Flag==checker means it has been released.
Definition at line 238 of file kmp_wait_release.h.
Referenced by kmp_flag_atomic< PtrType, FlagType, Sleepable >::done_check(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::done_check_val(), and kmp_flag_atomic< PtrType, FlagType, Sleepable >::notdone_check().
|
protected |
Pointer to flag location to wait on.
Definition at line 237 of file kmp_wait_release.h.
Referenced by kmp_flag_atomic< PtrType, FlagType, Sleepable >::get(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::get_void_p(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::load(), kmp_flag_atomic< PtrType, FlagType, Sleepable >::set(), and kmp_flag_atomic< PtrType, FlagType, Sleepable >::store().