A queue used to keep track of blocked uThreads.
More...
#include <BlockingSync.h>
|
|
template<typename T > |
| static void | postSwitchFunc (void *ut, void *args) |
| |
|
|
class | uThread |
| |
|
class | Mutex |
| |
|
class | OwnerLock |
| |
|
class | ConditionVariable |
| |
|
class | Semaphore |
| |
A queue used to keep track of blocked uThreads.
This queue is a FIFO queue used to hold blocked uThreads on Mutex, Semaphore, or Condition Variable.
| bool BlockingQueue::signal |
( |
std::mutex & |
lock, |
|
|
uThread *& |
owner |
|
) |
| |
Unblock one blocked uThread, used for OwnerLock.
- Parameters
-
| lock | mutex to be released after signal is done |
| owner | passed to support atomic setting of Mutex::owner |
- Returns
- true if a uThread was unblocked, and false otherwise
| bool BlockingQueue::signal |
( |
std::mutex & |
lock | ) |
|
|
inline |
unblock one blocked, used for Mutex
- Parameters
-
| lock | mutex to be released after signal is done |
- Returns
- true if a uThread was unblocked, and false otherwise
| bool BlockingQueue::signal |
( |
Mutex & |
mutex | ) |
|
| void BlockingQueue::signalAll |
( |
Mutex & |
mutex | ) |
|
unblock all blocked uThreads, used for Condition Variable
- Parameters
-
| Mutex | to be released after signallAll is done |
| bool BlockingQueue::suspend |
( |
std::mutex & |
lock | ) |
|
Suspends the uThread and add it to the queue.
- Parameters
-
| lock | a mutex to be released after blocking |
- Returns
- whether the suspension was successful or not
Suspends the uThread and adds it to the BlockingQueue.
| bool BlockingQueue::suspend |
( |
Mutex & |
mutex | ) |
|
Suspends the uThread and add it to the queue.
- Parameters
-
| lock | a mutex to be released after blocking |
- Returns
- whether the suspension was successful or not
Suspends the uThread and adds it to the BlockingQueue.
The documentation for this class was generated from the following files:
- /home/saman/Programming/Research/uThreads/src/runtime/BlockingSync.h
- /home/saman/Programming/Research/uThreads/src/runtime/BlockingSync.cpp