From: Andreas Dachsberger <andreas.dachsber...@embedded-brains.de> --- cpukit/include/rtems/score/semaphoreimpl.h | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
diff --git a/cpukit/include/rtems/score/semaphoreimpl.h b/cpukit/include/rtems/score/semaphoreimpl.h index a7857db93e..bc961eea08 100644 --- a/cpukit/include/rtems/score/semaphoreimpl.h +++ b/cpukit/include/rtems/score/semaphoreimpl.h @@ -1,3 +1,11 @@ +/** + * @file + * + * @ingroup RTEMSScoreSemaphore + * + * @brief Semaphore Implementation + */ + /* * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved. * @@ -20,6 +28,12 @@ #include <rtems/score/percpu.h> #include <rtems/score/threadqimpl.h> +/** + * @addtogroup RTEMSScoreSemaphore + * + * @{ + */ + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -31,11 +45,28 @@ typedef struct { #define SEMAPHORE_TQ_OPERATIONS &_Thread_queue_Operations_priority +/** + * @brief Gets the Sem_Control * of the semaphore. + * + * @param sem The Semaphore_Control * to cast to Sem_Control *. + * + * @return @a sem cast to Sem_Control *. + */ static inline Sem_Control *_Sem_Get( struct _Semaphore_Control *_sem ) { return (Sem_Control *) _sem; } +/** + * @brief Acquires the semaphore queue critical. + * + * This routine acquires the semaphore. + * + * @param[in, out] sem The semaphore to acquire the queue of. + * @param queue_context The thread queue context. + * + * @return The executing thread. + */ static inline Thread_Control *_Sem_Queue_acquire_critical( Sem_Control *sem, Thread_queue_Context *queue_context @@ -53,6 +84,13 @@ static inline Thread_Control *_Sem_Queue_acquire_critical( return executing; } +/** + * @brief Releases the semaphore queue. + * + * @param[in, out] sem The semaphore to release the queue of. + * @param level The interrupt level value to restore the interrupt status on the processor. + * @param queue_context The thread queue context. + */ static inline void _Sem_Queue_release( Sem_Control *sem, ISR_Level level, @@ -70,4 +108,6 @@ static inline void _Sem_Queue_release( } #endif /* __cplusplus */ +/** @} */ + #endif /* _RTEMS_SCORE_SEMAPHOREIMPL_H */ -- 2.16.4 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel