Classes | |
struct | _OS_APIS_MUTEX_TYPE |
Defines | |
#define | OS_APIS_MUTEX_DEPTH_SIMPLE_INITIALIZER {OS_APIS_MUTEX_IMPL_DEPTH_SIMPLE_INITIALIZER} |
#define | OS_APIS_MUTEX_DEPTH_RECURSIVE_INITIALIZER {OS_APIS_MUTEX_IMPL_DEPTH_RECURSIVE_INITIALIZER} |
Typedefs | |
typedef _OS_APIS_MUTEX_TYPE | OS_MUTEX_TYPE_IMPL |
Functions | |
void | OS_MutexInit (volatile OS_MUTEX_TYPE *lock) |
void | OS_MutexRecursiveInit (volatile OS_MUTEX_TYPE *lock) |
void | OS_MutexDestroy (volatile OS_MUTEX_TYPE *lock) |
void | OS_MutexLock (volatile OS_MUTEX_TYPE *lock) |
void | OS_MutexLockTid (volatile OS_MUTEX_TYPE *lock, NATIVE_TID myTid) |
BOOL_T | OS_MutexTryLock (volatile OS_MUTEX_TYPE *lock) |
BOOL_T | OS_MutexTryLockTid (volatile OS_MUTEX_TYPE *lock0, NATIVE_TID myTid) |
BOOL_T | OS_MutexIsLocked (volatile OS_MUTEX_TYPE *lock) |
BOOL_T | OS_MutexTimedLock (volatile OS_MUTEX_TYPE *lock, UINT32 timeoutMillis) |
BOOL_T | OS_MutexTimedLockTid (volatile OS_MUTEX_TYPE *lock0, NATIVE_TID myTid, UINT32 timeoutMillis) |
NATIVE_TID | OS_MutexGetOwner (volatile OS_MUTEX_TYPE *lock) |
UINT32 | OS_MutexGetRecursionLevel (volatile OS_MUTEX_TYPE *lock) |
BOOL_T | OS_MutexUnlock (volatile OS_MUTEX_TYPE *lock) |
|
Static initializer for a mutex. It is guaranteed that a (recursive) mutex initialized this way: OS_MUTEX_TYPE mutex = OS_APIS_MUTEX_DEPTH_SIMPLE_INITIALIZER; Will be initialized before any constuctor will be called.
|
|
Static initializer for a mutex. It is guaranteed that a (simple) mutex initialized this way: OS_MUTEX_TYPE mutex = OS_APIS_MUTEX_DEPTH_SIMPLE_INITIALIZER; Will be initialized before any constuctor will be called. Also, the static initializer for a simple mutex must be all zeros. This is because we want mutex that is initialized in a default way (all zeros according to the C++ standard) will be initialized correctly to a simple mutex.
|
|
This type holds a representation of a mutex.
|
|
Destroys a mutex after it is no longer in use.
|
|
Queries the owner of a recursive mutex.
|
|
Queries the recursion of a recursive mutex. I.e. the number of times that the unlock functions needs to be called before the mutex can be acquired by other thread.
|
|
Initialize a mutex. A mutex must be initialized before being used. Use this function to initialize the mutex or use one of the static initializers.
|
|
Checks whether a mutex state is locked.
|
|
Aquire a mutex, blocks until the mutex becomes available (according to the mutex's semantics).
|
|
Aquire a mutex, blocks until the mutex becomes available (according to the mutex's semantics). This function is similar to OS_MutexLock() except that it accept as an argument the thread ID of the thread that want to acquire the lock (which is usually the current thread).
|
|
Initialize a recursive mutex. A mutex must be initialized before being used. Use this function to initialize a recursive mutex or use one of the static initializers.
|
|
Aquire a mutex, blocks until the mutex becomes available (according to the mutex's semantics). or 'timeoutMillis' milli seconds passed. When 'timeoutMillis' is zero, this function is identical to OS_MutexTryLock().
|
|
Aquire a mutex, blocks until the mutex becomes available (according to the mutex's semantics). or 'timeoutMillis' milli seconds passed. When 'timeoutMillis' is zero, this function is identical to OS_MutexTryLock(). This function is similar to OS_MutexTimedLock() except that it accept as an argument the thread ID of the thread that want to acquire the lock (which is usually the current thread).
|
|
Tries to aquire a mutex:
|
|
Tries to aquire a mutex:
|
|
Releases a mutex.
|