RTEMS: cpukit/include/rtems/posix/muteximpl.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
muteximpl.h File Reference

Private Inlined Routines for POSIX Mutex's. More...

`#include <errno.h>`
`#include <pthread.h>`
`#include <rtems/score/percpu.h>`
`#include <rtems/score/muteximpl.h>`
`#include <rtems/score/threadimpl.h>`

Go to the source code of this file.

## Data Structures
struct | POSIX_Mutex_Control

## Macros
#define | POSIX_MUTEX_PROTOCOL_MASK 0x3UL
#define | POSIX_MUTEX_RECURSIVE 0x4UL
#define | POSIX_MUTEX_FLAGS_MASK 0x7UL
#define | POSIX_MUTEX_MAGIC 0x961c13b8UL
#define | POSIX_MUTEX_NO_PROTOCOL_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
#define | POSIX_MUTEX_PRIORITY_INHERIT_TQ_OPERATIONS &_Thread_queue_Operations_priority_inherit
#define | POSIX_MUTEX_PRIORITY_CEILING_TQ_OPERATIONS &_Thread_queue_Operations_priority
#define | POSIX_MUTEX_ABSTIME_TRY_LOCK ((uintptr_t) 1)
#define | POSIX_MUTEX_VALIDATE_OBJECT(the_mutex, flags)

## Enumerations
enum | POSIX_Mutex_Protocol { POSIX_MUTEX_NO_PROTOCOL , POSIX_MUTEX_PRIORITY_INHERIT , POSIX_MUTEX_PRIORITY_CEILING }
| Supported POSIX mutex protocols. More...

## Functions
RTEMS_INLINE_ROUTINE Thread_Control * | _POSIX_Mutex_Acquire (POSIX_Mutex_Control *the_mutex, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE void | _POSIX_Mutex_Release (POSIX_Mutex_Control *the_mutex, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE POSIX_Mutex_Protocol | _POSIX_Mutex_Get_protocol (unsigned long flags)
RTEMS_INLINE_ROUTINE bool | _POSIX_Mutex_Is_recursive (unsigned long flags)
RTEMS_INLINE_ROUTINE Thread_Control * | _POSIX_Mutex_Get_owner (const POSIX_Mutex_Control *the_mutex)
RTEMS_INLINE_ROUTINE bool | _POSIX_Mutex_Is_locked (const POSIX_Mutex_Control *the_mutex)
Status_Control | _POSIX_Mutex_Seize_slow (POSIX_Mutex_Control *the_mutex, const Thread_queue_Operations *operations, Thread_Control *executing, const struct timespec *abstime, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE void | _POSIX_Mutex_Set_owner (POSIX_Mutex_Control *the_mutex, Thread_Control *owner)
RTEMS_INLINE_ROUTINE bool | _POSIX_Mutex_Is_owner (const POSIX_Mutex_Control *the_mutex, const Thread_Control *the_thread)
RTEMS_INLINE_ROUTINE Status_Control | _POSIX_Mutex_Seize (POSIX_Mutex_Control *the_mutex, unsigned long flags, const Thread_queue_Operations *operations, Thread_Control *executing, const struct timespec *abstime, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE Status_Control | _POSIX_Mutex_Surrender (POSIX_Mutex_Control *the_mutex, const Thread_queue_Operations *operations, Thread_Control *executing, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE const Scheduler_Control * | _POSIX_Mutex_Get_scheduler (const POSIX_Mutex_Control *the_mutex)
RTEMS_INLINE_ROUTINE void | _POSIX_Mutex_Set_priority (POSIX_Mutex_Control *the_mutex, Priority_Control priority_ceiling, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE Priority_Control | _POSIX_Mutex_Get_priority (const POSIX_Mutex_Control *the_mutex)
RTEMS_INLINE_ROUTINE Status_Control | _POSIX_Mutex_Ceiling_set_owner (POSIX_Mutex_Control *the_mutex, Thread_Control *owner, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE Status_Control | _POSIX_Mutex_Ceiling_seize (POSIX_Mutex_Control *the_mutex, unsigned long flags, Thread_Control *executing, const struct timespec *abstime, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE Status_Control | _POSIX_Mutex_Ceiling_surrender (POSIX_Mutex_Control *the_mutex, Thread_Control *executing, Thread_queue_Context *queue_context)
int | _POSIX_Mutex_Lock_support (pthread_mutex_t *mutex, const struct timespec *abstime, Thread_queue_Enqueue_callout enqueue_callout)
bool | _POSIX_Mutex_Auto_initialization (POSIX_Mutex_Control *the_mutex)

## Variables
const pthread_mutexattr_t | _POSIX_Mutex_Default_attributes

## Detailed Description

Private Inlined Routines for POSIX Mutex's.

This include file contains the static inline implementation of the private inlined routines for POSIX mutex's.

## Macro Definition Documentation

## ◆ POSIX_MUTEX_VALIDATE_OBJECT

#define POSIX_MUTEX_VALIDATE_OBJECT | ( |  | the_mutex,
|  |  | flags
| ) |  |

Value:
do { \
if ( ( the_mutex ) == NULL ) { \
return EINVAL; \
} \
flags = ( the_mutex )->flags; \
if ( \
( ( (uintptr_t) ( the_mutex ) ^ POSIX_MUTEX_MAGIC ) \
& ~POSIX_MUTEX_FLAGS_MASK ) \
!= ( flags & ~POSIX_MUTEX_FLAGS_MASK ) \
) { \
if ( !_POSIX_Mutex_Auto_initialization( the_mutex ) ) { \
return EINVAL; \
} \
} \
} while ( 0 )
NULL
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77

## Enumeration Type Documentation

## ◆ POSIX_Mutex_Protocol

enum POSIX_Mutex_Protocol

Supported POSIX mutex protocols.

Must be in synchronization with POSIX_Mutex_Control::protocol.

## Variable Documentation

## ◆ _POSIX_Mutex_Default_attributes

const pthread_mutexattr_t _POSIX_Mutex_Default_attributes
| extern

The default mutex attributes structure.