Standard C Library File, I/O and OS Retargeting
All Data Structures Functions Variables Typedefs Modules Pages
Arm C Library

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...
 

Description

Typedef Documentation

◆ rt_mutex_t

The rt_mutex_s is an incomplete type, an implementation must define it.

Function Documentation

◆ __user_perthread_libspace()

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.

◆ _mutex_acquire()

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.

Parameters
[in]mutexPointer to mutex object

◆ _mutex_free()

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.

Parameters
[in]mutexPointer to mutex object

◆ _mutex_initialize()

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.

Parameters
[in]mutexPointer to mutex object
Returns
Upon successful completion, nonzero value is returned. Otherwise, the function returns 0.

◆ _mutex_release()

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.

Parameters
[in]mutexPointer to mutex object