UCommon
|
Condition classes for thread sychronization and timing. More...
#include <ucommon/cpr.h>
#include <ucommon/timers.h>
#include <ucommon/memory.h>
#include <ucommon/access.h>
Go to the source code of this file.
Namespaces | |
ucommon | |
Common namespace for all ucommon objects. | |
Typedefs | |
typedef ConditionalAccess | ucommon::accesslock_t |
Convenience type for scheduling access. | |
typedef Barrier | ucommon::barrier_t |
Convenience type for using thread barriers. | |
typedef Semaphore | ucommon::semaphore_t |
Convenience type for using counting semaphores. | |
Functions | |
class | ucommon::__attribute__ ((visibility("default"))) ExclusiveProtocol |
An exclusive locking protocol interface base. More... | |
Variables | |
class __attribute__((visibility("default"))) Conditional class __attribute__((visibility("default"))) ConditionalAccess class __attribute__((visibility("default"))) ConditionalLock class __attribute__((visibility("default"))) Barrier class __attribute__((visibility("default"))) Semaphore typedef ConditionalLock | ucommon::condlock_t |
The conditional is a common base for other thread synchronizing classes. More... | |
Condition classes for thread sychronization and timing.
The theory behind ucommon sychronization objects is that all upper level sychronization objects can be formed directly from a mutex and conditional. This includes semaphores, barriers, rwlock, our own specialized conditional lock, resource-bound locking, and recursive exclusive locks. Using only conditionals means we are not dependent on platform specific pthread implementations that may not implement some of these, and hence improves portability and consistency. Given that our rwlocks are recursive access locks, one can safely create read/write threading pairs where the read threads need not worry about deadlocks and the writers need not either if they only write-lock one instance at a time to change state.
Definition in file condition.h.