38#ifndef _RTEMS_POSIX_SEMAPHOREIMPL_H
39#define _RTEMS_POSIX_SEMAPHOREIMPL_H
54#define POSIX_SEMAPHORE_MAGIC 0x5d367fe7UL
57 _POSIX_Semaphore_Allocate_unprotected(
void )
69static inline void _POSIX_Semaphore_Free (
83static inline bool _POSIX_Semaphore_Is_named(
const sem_t *sem )
85 return sem->_Semaphore._Queue._name !=
NULL;
88static inline bool _POSIX_Semaphore_Is_busy(
const sem_t *sem )
90 return sem->_Semaphore._Queue._heads !=
NULL;
93static inline void _POSIX_Semaphore_Initialize(
100 _Semaphore_Initialize_named( &sem->_Semaphore, name, value );
103static inline void _POSIX_Semaphore_Destroy( sem_t *sem )
106 _Semaphore_Destroy( &sem->_Semaphore );
119static inline void _POSIX_Semaphore_Namespace_remove (
125 &the_semaphore->Object
131 size_t *name_length_p,
132 Objects_Get_by_name_error *error
143#define POSIX_SEMAPHORE_VALIDATE_OBJECT( sem ) \
147 || ( (uintptr_t) ( sem ) ^ POSIX_SEMAPHORE_MAGIC ) != ( sem )->_flags \
149 rtems_set_errno_and_return_minus_one( EINVAL ); \
Objects_Information _POSIX_Semaphore_Information
The POSIX Semaphore objects information.
#define RTEMS_CONTAINER_OF(_m, _type, _member_name)
Gets the container of a member.
Definition: basedefs.h:306
Objects_Control * _Objects_Get_by_name(const Objects_Information *information, const char *name, size_t *name_length_p, Objects_Get_by_name_error *error)
Gets an object control block identified by its name.
Definition: objectnametoidstring.c:46
void _Objects_Namespace_remove_string(const Objects_Information *information, Objects_Control *the_object)
Removes object with a string name from its namespace.
Definition: objectnamespaceremove.c:45
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
void _POSIX_Semaphore_Delete(POSIX_Semaphore_Control *the_semaphore)
POSIX Semaphore Delete.
Definition: semaphoredeletesupp.c:42
#define POSIX_SEMAPHORE_MAGIC
This is a random number used to check if a semaphore object is properly initialized.
Definition: semaphoreimpl.h:54
This header file provides interfaces used by the POSIX API implementation.
This header file provides the interfaces of the System Lock Semaphore Support.
Private Support Information for POSIX Semaphores.
This header file defines macros to set errno and return minus one.
Definition: semaphore.h:63