gem5
v19.0.0.0
|
FutexMap class holds a map of all futexes used in the system. More...
#include <futex_map.hh>
Public Member Functions | |
void | suspend (Addr addr, uint64_t tgid, ThreadContext *tc) |
Inserts a futex into the map with one waiting TC. More... | |
int | wakeup (Addr addr, uint64_t tgid, int count) |
Wakes up at most count waiting threads on a futex. More... | |
void | suspend_bitset (Addr addr, uint64_t tgid, ThreadContext *tc, int bitmask) |
inserts a futex into the map with one waiting TC associates the waiter with a given bitmask More... | |
int | wakeup_bitset (Addr addr, uint64_t tgid, int bitmask) |
Wakes up all waiters waiting on the addr and associated with the given bitset. More... | |
int | requeue (Addr addr1, uint64_t tgid, int count, int count2, Addr addr2) |
This operation wakes a given number (val) of waiters. More... | |
FutexMap class holds a map of all futexes used in the system.
Definition at line 121 of file futex_map.hh.
This operation wakes a given number (val) of waiters.
If there are more threads waiting than woken, they are removed from the wait queue of the futex pointed to by addr1 and added to the wait queue of the futex pointed to by addr2. The number of waiter moved is capped by count2 (misused timeout parameter).
The return value is the number of waiters that are woken or requeued.
Definition at line 243 of file futex_map.hh.
References X86ISA::count, ArmISA::it1, ArmISA::it2, and MipsISA::w.
Referenced by futexFunc().
|
inline |
Inserts a futex into the map with one waiting TC.
Suspend the thread context
Definition at line 126 of file futex_map.hh.
References ThreadContext::suspend().
Referenced by futexFunc().
|
inline |
inserts a futex into the map with one waiting TC associates the waiter with a given bitmask
Suspend the thread context
Definition at line 179 of file futex_map.hh.
References ThreadContext::suspend().
Referenced by futexFunc().
|
inline |
Wakes up at most count waiting threads on a futex.
Definition at line 144 of file futex_map.hh.
References X86ISA::count, and ThreadContext::Suspended.
Referenced by exitFutexWake(), and futexFunc().
|
inline |
Wakes up all waiters waiting on the addr and associated with the given bitset.
Definition at line 201 of file futex_map.hh.
References ThreadContext::activate(), WaiterState::checkMask(), and WaiterState::tc.
Referenced by futexFunc().