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

| RTEMS 5.4-rc2

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
RTEMS_INLINE_ROUTINE void | _POSIX_Condition_variables_Initialize (POSIX_Condition_variables_Control *the_cond, const pthread_condattr_t *the_attr)
RTEMS_INLINE_ROUTINE void | _POSIX_Condition_variables_Destroy (POSIX_Condition_variables_Control *the_cond)
RTEMS_INLINE_ROUTINE clockid_t | _POSIX_Condition_variables_Get_clock (unsigned long flags)
RTEMS_INLINE_ROUTINE Thread_Control * | _POSIX_Condition_variables_Acquire (POSIX_Condition_variables_Control *the_cond, Thread_queue_Context *queue_context)
RTEMS_INLINE_ROUTINE void | _POSIX_Condition_variables_Release (POSIX_Condition_variables_Control *the_cond, Thread_queue_Context *queue_context)
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:
RTEMS_CONTAINER_OF( \
queue, POSIX_Condition_variables_Control, Queue.Queue )
RTEMS_CONTAINER_OF
#define RTEMS_CONTAINER_OF(_m, _type, _member_name)
Returns a pointer to the container of a specified member pointer.
Definition: basedefs.h:430
POSIX_Condition_variables_Control
Definition: condimpl.h:30

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

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