The conditional rw seperates scheduling for optizming behavior or rw locks.
More...
#include <condition.h>
|
void | access (void) |
| Access mode shared thread scheduling.
|
|
void | commit (void) |
| Complete exclusive mode write scheduling.
|
|
| ConditionalAccess () |
| Initialize and construct conditional.
|
|
void | limit_sharing (unsigned max) |
| Specify a maximum sharing (access) limit. More...
|
|
void | modify (void) |
| Exclusive mode write thread scheduling.
|
|
void | release (void) |
| Release access mode read scheduling.
|
|
| ~ConditionalAccess () |
| Destroy conditional, release any blocked threads.
|
|
|
static void | set (struct timespec *hires, timeout_t timeout) |
| Convert a millisecond timeout into use for high resolution conditional timers. More...
|
|
|
pthread_cond_t | bcast |
|
unsigned | pending |
|
unsigned | sharing |
|
unsigned | waiting |
|
|
static unsigned | max_sharing |
|
The conditional rw seperates scheduling for optizming behavior or rw locks.
This varient of conditonal seperates scheduling read (broadcast wakeup) and write (signal wakeup) based threads. This is used to form generic rwlock's as well as the specialized condlock.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 337 of file condition.h.
◆ limit_sharing()
void ucommon::ConditionalAccess::limit_sharing |
( |
unsigned |
max | ) |
|
Specify a maximum sharing (access) limit.
This can be used to detect locking errors, such as when aquiring locks that are not released.
- Parameters
-
◆ set()
static void ucommon::ConditionalAccess::set |
( |
struct timespec * |
hires, |
|
|
timeout_t |
timeout |
|
) |
| |
|
inlinestaticprotected |
Convert a millisecond timeout into use for high resolution conditional timers.
- Parameters
-
hires | timespec representation to set. |
timeout | to convert. |
Definition at line 388 of file condition.h.
◆ waitBroadcast() [1/2]
bool ucommon::ConditionalAccess::waitBroadcast |
( |
timeout_t |
timeout | ) |
|
|
protected |
Conditional wait for broadcast on millisecond timeout.
- Parameters
-
- Returns
- true if signalled, false if timer expired.
◆ waitBroadcast() [2/2]
bool ucommon::ConditionalAccess::waitBroadcast |
( |
struct timespec * |
timeout | ) |
|
|
protected |
Conditional wait for broadcast on timespec timeout.
- Parameters
-
timeout | as a high resolution timespec. |
- Returns
- true if signalled, false if timer expired.
◆ waitSignal() [1/2]
bool ucommon::ConditionalAccess::waitSignal |
( |
timeout_t |
timeout | ) |
|
|
protected |
Conditional wait for signal on millisecond timeout.
- Parameters
-
- Returns
- true if signalled, false if timer expired.
◆ waitSignal() [2/2]
bool ucommon::ConditionalAccess::waitSignal |
( |
struct timespec * |
timeout | ) |
|
|
protected |
Conditional wait for signal on timespec timeout.
- Parameters
-
timeout | as a high resolution timespec. |
- Returns
- true if signalled, false if timer expired.
The documentation for this class was generated from the following file: