LLVM OpenMP* Runtime Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
kmp_flag_native< PtrType, FlagType, Sleepable > Class Template Reference

#include <kmp_wait_release.h>

Inheritance diagram for kmp_flag_native< PtrType, FlagType, Sleepable >:
kmp_flag< FlagType >

Public Member Functions

virtual bool done_check ()
 
virtual bool done_check_val (PtrType old_loc)
 
virtual bool notdone_check ()
 
void internal_release ()
 
PtrType set_sleeping ()
 
void unset_sleeping ()
 
bool is_sleeping_val (PtrType old_loc)
 
bool is_sleeping ()
 
- Public Member Functions inherited from kmp_flag< FlagType >
flag_type get_type ()
 
kmp_info_t * get_waiter (kmp_uint32 i)
 
kmp_uint32 get_num_waiters ()
 
void set_waiter (kmp_info_t *thr)
 

Protected Attributes

PtrType checker
 
- Protected Attributes inherited from kmp_flag< FlagType >
flag_properties t
 
kmp_info_t * waiting_threads [1]
 
kmp_uint32 num_waiting_threads
 

Detailed Description

template<typename PtrType, flag_type FlagType, bool Sleepable>
class kmp_flag_native< PtrType, FlagType, Sleepable >

Base class for wait/release volatile flag

Definition at line 140 of file kmp_wait_release.h.

Member Function Documentation

◆ done_check()

template<typename PtrType , flag_type FlagType, bool Sleepable>
virtual bool kmp_flag_native< PtrType, FlagType, Sleepable >::done_check ( )
inlinevirtual
Returns
true if the flag object has been released.

Definition at line 166 of file kmp_wait_release.h.

◆ done_check_val()

template<typename PtrType , flag_type FlagType, bool Sleepable>
virtual bool kmp_flag_native< PtrType, FlagType, Sleepable >::done_check_val ( PtrType  old_loc)
inlinevirtual
Parameters
old_locin old value of flag
Returns
true if the flag's old value indicates it was released.

Definition at line 175 of file kmp_wait_release.h.

◆ internal_release()

template<typename PtrType , flag_type FlagType, bool Sleepable>
void kmp_flag_native< PtrType, FlagType, Sleepable >::internal_release ( )
inline
Returns
Actual flag value before release was applied. Trigger all waiting threads to run by modifying flag to release state.

Definition at line 186 of file kmp_wait_release.h.

◆ is_sleeping()

template<typename PtrType , flag_type FlagType, bool Sleepable>
bool kmp_flag_native< PtrType, FlagType, Sleepable >::is_sleeping ( )
inline

Test whether there are threads sleeping on the flag.

Definition at line 219 of file kmp_wait_release.h.

◆ is_sleeping_val()

template<typename PtrType , flag_type FlagType, bool Sleepable>
bool kmp_flag_native< PtrType, FlagType, Sleepable >::is_sleeping_val ( PtrType  old_loc)
inline
Parameters
old_locin old value of flag Test if there are threads sleeping on the flag's old value in old_loc.

Definition at line 213 of file kmp_wait_release.h.

Referenced by kmp_flag_native< PtrType, FlagType, Sleepable >::is_sleeping().

◆ notdone_check()

template<typename PtrType , flag_type FlagType, bool Sleepable>
virtual bool kmp_flag_native< PtrType, FlagType, Sleepable >::notdone_check ( )
inlinevirtual
Returns
true if the flag object is not yet released. Used in __kmp_wait_template like:
while (flag.notdone_check()) { pause(); }

Definition at line 181 of file kmp_wait_release.h.

◆ set_sleeping()

template<typename PtrType , flag_type FlagType, bool Sleepable>
PtrType kmp_flag_native< PtrType, FlagType, Sleepable >::set_sleeping ( )
inline
Returns
Actual flag value before sleep bit(s) set. Notes that there is at least one thread sleeping on the flag by setting sleep bit(s).

Definition at line 192 of file kmp_wait_release.h.

◆ unset_sleeping()

template<typename PtrType , flag_type FlagType, bool Sleepable>
void kmp_flag_native< PtrType, FlagType, Sleepable >::unset_sleeping ( )
inline
Returns
Actual flag value before sleep bit(s) cleared. Notes that there are no longer threads sleeping on the flag by clearing sleep bit(s).

Definition at line 203 of file kmp_wait_release.h.

Member Data Documentation

◆ checker

template<typename PtrType , flag_type FlagType, bool Sleepable>
PtrType kmp_flag_native< PtrType, FlagType, Sleepable >::checker
protected

The documentation for this class was generated from the following file: