From 6fa8cd43020e263ed18690e17838f1381a14fcb0 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Wed, 27 Jul 2011 14:12:35 +0000 Subject: [PATCH] Add in the vSemaphoreDelete() macro. --- Source/include/semphr.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/include/semphr.h b/Source/include/semphr.h index 0130f1d79..3ccce2726 100644 --- a/Source/include/semphr.h +++ b/Source/include/semphr.h @@ -711,6 +711,19 @@ typedef xQueueHandle xSemaphoreHandle; */ #define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) ) +/** + * semphr. h + *
void vSemaphoreDelete( xSemaphoreHandle xSemaphore );
+ * + * Delete a semaphore. This function must be used with care. For example, + * do not delete a mutex type semaphore if the mutex is held by a task. + * + * @param xSemaphore A handle to the semaphore to be deleted. + * + * \page vSemaphoreDelete vSemaphoreDelete + * \ingroup Semaphores + */ +#define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( xQueueHandle ) xSemaphore ) #endif /* SEMAPHORE_H */