RTEMS CPU Kit with SuperCore
4.11.3
|
Private Inlined Routines for POSIX Mutex's. More...
Go to the source code of this file.
Functions | |
void | _POSIX_Mutex_Manager_initialization (void) |
POSIX Mutex Manager Initialization. More... | |
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control * | _POSIX_Mutex_Allocate (void) |
POSIX Mutex Allocate. More... | |
RTEMS_INLINE_ROUTINE void | _POSIX_Mutex_Free (POSIX_Mutex_Control *the_mutex) |
POSIX Mutex Free. More... | |
int | _POSIX_Mutex_Lock_support (pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout) |
POSIX Mutex Lock Support Method. More... | |
RTEMS_INLINE_ROUTINE int | _POSIX_Mutex_Translate_core_mutex_return_code (CORE_mutex_Status the_mutex_status) |
Convert Score mutex status codes into POSIX status values. More... | |
POSIX_Mutex_Control * | _POSIX_Mutex_Get (pthread_mutex_t *mutex, Objects_Locations *location) |
POSIX Mutex Get (Thread Dispatch Disable) More... | |
POSIX_Mutex_Control * | _POSIX_Mutex_Get_interrupt_disable (pthread_mutex_t *mutex, Objects_Locations *location, ISR_lock_Context *lock_context) |
POSIX Mutex Get (Interrupt Disable) More... | |
Variables | |
POSIX_EXTERN Objects_Information | _POSIX_Mutex_Information |
The following defines the information control block used to manage this class of objects. | |
POSIX_EXTERN pthread_mutexattr_t | _POSIX_Mutex_Default_attributes |
The default mutex attributes structure. | |
const int | _POSIX_Mutex_Return_codes [CORE_MUTEX_STATUS_LAST+1] |
This array contains a mapping from Score Mutex return codes to POSIX return codes. | |
Private Inlined Routines for POSIX Mutex's.
This include file contains the static inline implementation of the private inlined routines for POSIX mutex's.
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control* _POSIX_Mutex_Allocate | ( | void | ) |
POSIX Mutex Allocate.
This function allocates a mutexes control block from the inactive chain of free mutexes control blocks.
References _Objects_Allocate().
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free | ( | POSIX_Mutex_Control * | the_mutex | ) |
POSIX Mutex Free.
This routine frees a mutexes control block to the inactive chain of free mutexes control blocks.
POSIX_Mutex_Control* _POSIX_Mutex_Get | ( | pthread_mutex_t * | mutex, |
Objects_Locations * | location | ||
) |
POSIX Mutex Get (Thread Dispatch Disable)
A support routine which translates the mutex id into a local pointer. As a side-effect, it may create the mutex.
Referenced by _POSIX_Mutex_Translate_core_mutex_return_code(), and pthread_mutex_init().
POSIX_Mutex_Control* _POSIX_Mutex_Get_interrupt_disable | ( | pthread_mutex_t * | mutex, |
Objects_Locations * | location, | ||
ISR_lock_Context * | lock_context | ||
) |
POSIX Mutex Get (Interrupt Disable)
A support routine which translates the mutex id into a local pointer. As a side-effect, it may create the mutex.
Referenced by _POSIX_Mutex_Translate_core_mutex_return_code().
int _POSIX_Mutex_Lock_support | ( | pthread_mutex_t * | mutex, |
bool | blocking, | ||
Watchdog_Interval | timeout | ||
) |
POSIX Mutex Lock Support Method.
A support routine which implements guts of the blocking, non-blocking, and timed wait version of mutex lock.
Referenced by pthread_mutex_trylock().
void _POSIX_Mutex_Manager_initialization | ( | void | ) |
POSIX Mutex Manager Initialization.
This routine performs the initialization necessary for this manager.
References _Objects_Initialize_information(), _POSIX_Mutex_Default_attributes, _POSIX_Mutex_Information, and POSIX_SCHEDULER_MAXIMUM_PRIORITY.
RTEMS_INLINE_ROUTINE int _POSIX_Mutex_Translate_core_mutex_return_code | ( | CORE_mutex_Status | the_mutex_status | ) |
Convert Score mutex status codes into POSIX status values.
A support routine which converts core mutex status codes into the appropriate POSIX status values.
[in] | the_mutex_status | is the mutex status code to translate |
0 | Mutex status code indicates the operation completed successfully. |
EBUSY | Mutex status code indicates that the operation unable to complete immediately because the resource was unavailable. |
EDEADLK | Mutex status code indicates that an attempt was made to relock a mutex for which nesting is not configured. |
EPERM | Mutex status code indicates that an attempt was made to release a mutex by a thread other than the thread which locked it. |
EINVAL | Mutex status code indicates that the thread was blocked waiting for an operation to complete and the mutex was deleted. |
ETIMEDOUT | Mutex status code indicates that the calling task was willing to block but the operation was unable to complete within the time allotted because the resource never became available. |
References _POSIX_Mutex_Get(), _POSIX_Mutex_Get_interrupt_disable(), and CORE_MUTEX_STATUS_LAST.