RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
condimpl.h File Reference
#include <errno.h>
#include <pthread.h>
#include <rtems/score/percpu.h>
#include <rtems/score/threadqimpl.h>

Go to the source code of this file.

Data Structures

struct  POSIX_Condition_variables_Control
 

Macros

#define POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC   0x1UL
 
#define POSIX_CONDITION_VARIABLES_FLAGS_MASK   0x1UL
 
#define POSIX_CONDITION_VARIABLES_MAGIC   0x18dfb1feUL
 
#define POSIX_CONDITION_VARIABLES_NO_MUTEX   NULL
 
#define POSIX_CONDITION_VARIABLES_TQ_OPERATIONS   &_Thread_queue_Operations_FIFO
 
#define POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE(queue)
 
#define POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT(the_cond, flags)
 

Functions

int _POSIX_Condition_variables_Signal_support (pthread_cond_t *cond, bool is_broadcast)
 Implements wake up version of the "signal" operation.
 
int _POSIX_Condition_variables_Wait_support (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
 POSIX condition variables wait support.
 
bool _POSIX_Condition_variables_Auto_initialization (POSIX_Condition_variables_Control *the_cond)
 

Variables

const pthread_condattr_t _POSIX_Condition_variables_Default_attributes
 

Detailed Description

This include file contains the static inline implementation of the private inlined routines for POSIX condition variables.

Macro Definition Documentation

◆ POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE

#define POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE (   queue)
Value:
queue, POSIX_Condition_variables_Control, Queue.Queue )
#define RTEMS_CONTAINER_OF(_m, _type, _member_name)
Gets the container of a member.
Definition: basedefs.h:306
Definition: condimpl.h:49

◆ POSIX_CONDITION_VARIABLES_NO_MUTEX

#define POSIX_CONDITION_VARIABLES_NO_MUTEX   NULL

Constant to indicate condition variable does not currently have a mutex assigned to it.

◆ POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT

#define POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT (   the_cond,
  flags 
)
Value:
do { \
if ( ( the_cond ) == NULL ) { \
return EINVAL; \
} \
flags = ( the_cond )->flags; \
if ( \
( ( (uintptr_t) ( the_cond ) ^ POSIX_CONDITION_VARIABLES_MAGIC ) \
& ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
!= ( flags & ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
) { \
if ( !_POSIX_Condition_variables_Auto_initialization( the_cond ) ) { \
return EINVAL; \
} \
} \
} while ( 0 )

Function Documentation

◆ _POSIX_Condition_variables_Signal_support()

int _POSIX_Condition_variables_Signal_support ( pthread_cond_t *  cond,
bool  is_broadcast 
)

Implements wake up version of the "signal" operation.

A support routine which implements guts of the broadcast and single task wake up version of the "signal" operation.

◆ _POSIX_Condition_variables_Wait_support()

int _POSIX_Condition_variables_Wait_support ( pthread_cond_t *  cond,
pthread_mutex_t *  mutex,
const struct timespec *  abstime 
)

POSIX condition variables wait support.

A support routine which implements guts of the blocking, non-blocking, and timed wait version of condition variable wait routines.

Variable Documentation

◆ _POSIX_Condition_variables_Default_attributes

const pthread_condattr_t _POSIX_Condition_variables_Default_attributes
extern

The default condition variable attributes structure.