![]() |
CMSIS-Compiler Support
Version 1.0.0
Standard C Library File, I/O and OS Retargeting
|
Typedefs | |
typedef struct rt_mutex_s | rt_mutex_t |
The rt_mutex_s is an incomplete type, an implementation must define it. More... | |
Functions | |
void * | __user_perthread_libspace (void) |
Retrieve thread local storage. More... | |
int | _mutex_initialize (rt_mutex_t *mutex) |
Initialize mutex. More... | |
void | _mutex_acquire (rt_mutex_t *mutex) |
Acquire mutex. More... | |
void | _mutex_release (rt_mutex_t *mutex) |
Release mutex. More... | |
void | _mutex_free (rt_mutex_t *mutex) |
Free mutex. More... | |
The rt_mutex_s is an incomplete type, an implementation must define it.
void * __user_perthread_libspace | ( | void | ) |
Retrieve thread local storage.
This function returns a pointer to memory for storing data that is local to a particular thread. This means that __user_perthread_libspace() returns a different address depending on the thread it is called from.
void _mutex_acquire | ( | rt_mutex_t * | mutex | ) |
Acquire mutex.
This function causes the calling thread to obtain a lock on the supplied mutex. _mutex_acquire() returns immediately if the mutex has no owner. If the mutex is owned by another thread, _mutex_acquire() must block until it becomes available. _mutex_acquire() is not called by the thread that already owns the mutex.
[in] | mutex | Pointer to mutex object |
void _mutex_free | ( | rt_mutex_t * | mutex | ) |
Free mutex.
This function causes the calling thread to free the supplied mutex. Any operating system resources associated with the mutex are freed. The mutex is destroyed and cannot be reused. _mutex_free() assumes that the mutex is owned by the calling thread.
[in] | mutex | Pointer to mutex object |
int _mutex_initialize | ( | rt_mutex_t * | mutex | ) |
Initialize mutex.
This function accepts a pointer to a pointer-sized word and initializes it as a valid mutex. By default, _mutex_initialize() returns zero for a nonthreaded application. Therefore, in a multithreaded application, _mutex_initialize() must return a nonzero value on success so that at runtime, the library knows that it is being used in a multithreaded environment. Ensure that _mutex_initialize() initializes the mutex to an unlocked state.
[in] | mutex | Pointer to mutex object |
void _mutex_release | ( | rt_mutex_t * | mutex | ) |
Release mutex.
This function causes the calling thread to release the lock on a mutex acquired by _mutex_acquire(). The mutex remains in existence, and can be re-locked by a subsequent call to mutex_acquire(). _mutex_release() assumes that the mutex is owned by the calling thread.
[in] | mutex | Pointer to mutex object |