RTEMS 6.1-rc1
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

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)
 
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 )
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54

Enumeration Type Documentation

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