RTEMS  5.0.0
Macros | Functions
semaphoreimpl.h File Reference

Private Inlined Routines for POSIX Semaphores. More...

#include <rtems/posix/semaphore.h>
#include <rtems/posix/posixapi.h>
#include <rtems/score/semaphoreimpl.h>
#include <rtems/seterr.h>

Go to the source code of this file.

Macros

#define POSIX_SEMAPHORE_MAGIC   0x5d367fe7UL
 This is a random number used to check if a semaphore object is properly initialized.
 
#define POSIX_SEMAPHORE_VALIDATE_OBJECT(sem)
 

Functions

RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control_POSIX_Semaphore_Allocate_unprotected (void)
 
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (POSIX_Semaphore_Control *the_semaphore)
 POSIX Semaphore Free. More...
 
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control_POSIX_Semaphore_Get (sem_t *sem)
 
RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_named (const sem_t *sem)
 
RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_busy (const sem_t *sem)
 
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Initialize (sem_t *sem, const char *name, unsigned int value)
 
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Destroy (sem_t *sem)
 
void _POSIX_Semaphore_Delete (POSIX_Semaphore_Control *the_semaphore)
 POSIX Semaphore Delete. More...
 
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (POSIX_Semaphore_Control *the_semaphore)
 POSIX Semaphore Namespace Remove.
 
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control_POSIX_Semaphore_Get_by_name (const char *name, size_t *name_length_p, Objects_Get_by_name_error *error)
 

Detailed Description

Private Inlined Routines for POSIX Semaphores.

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

Macro Definition Documentation

◆ POSIX_SEMAPHORE_VALIDATE_OBJECT

#define POSIX_SEMAPHORE_VALIDATE_OBJECT (   sem)
Value:
do { \
if ( \
( sem ) == NULL \
|| ( (uintptr_t) ( sem ) ^ POSIX_SEMAPHORE_MAGIC ) != ( sem )->_flags \
) { \
rtems_set_errno_and_return_minus_one( EINVAL ); \
} \
} while ( 0 )
#define POSIX_SEMAPHORE_MAGIC
This is a random number used to check if a semaphore object is properly initialized.
Definition: semaphoreimpl.h:35
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77

Function Documentation

◆ _POSIX_Semaphore_Delete()

void _POSIX_Semaphore_Delete ( POSIX_Semaphore_Control the_semaphore)

POSIX Semaphore Delete.

This routine supports the sem_close and sem_unlink routines.

◆ _POSIX_Semaphore_Free()

RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control the_semaphore)

POSIX Semaphore Free.

This routine frees a semaphore control block to the inactive chain of free semaphore control blocks.