From: richardbarry Date: Wed, 27 Jul 2011 14:12:35 +0000 (+0000) Subject: Add in the vSemaphoreDelete() macro. X-Git-Tag: V7.0.2~97 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0cc357cd9c8f1dc0bfb07246891b0a36dc2424b;p=freertos Add in the vSemaphoreDelete() macro. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1513 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- 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 */