From d0cc357cd9c8f1dc0bfb07246891b0a36dc2424b Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 27 Jul 2011 14:12:35 +0000 Subject: [PATCH] Add in the vSemaphoreDelete() macro. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1513 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- 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 */ -- 2.39.5