From 8b631cd1b7f456d17f513340759e9d96d2cc69a7 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Thu, 7 Nov 2013 11:11:18 +0000 Subject: [PATCH] Update semtest.c to use xSemaphoreCreateBinary() in place of vSemaphoreCreateBinary. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2085 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Demo/Common/Minimal/semtest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Demo/Common/Minimal/semtest.c b/FreeRTOS/Demo/Common/Minimal/semtest.c index a146ad506..9d1b822b9 100644 --- a/FreeRTOS/Demo/Common/Minimal/semtest.c +++ b/FreeRTOS/Demo/Common/Minimal/semtest.c @@ -135,7 +135,8 @@ const portTickType xBlockTime = ( portTickType ) 100; if( pxFirstSemaphoreParameters != NULL ) { /* Create the semaphore used by the first two tasks. */ - vSemaphoreCreateBinary( pxFirstSemaphoreParameters->xSemaphore ); + pxFirstSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary(); + xSemaphoreGive( pxFirstSemaphoreParameters->xSemaphore ); if( pxFirstSemaphoreParameters->xSemaphore != NULL ) { @@ -159,7 +160,8 @@ const portTickType xBlockTime = ( portTickType ) 100; pxSecondSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) ); if( pxSecondSemaphoreParameters != NULL ) { - vSemaphoreCreateBinary( pxSecondSemaphoreParameters->xSemaphore ); + pxSecondSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary(); + xSemaphoreGive( pxSecondSemaphoreParameters->xSemaphore ); if( pxSecondSemaphoreParameters->xSemaphore != NULL ) { -- 2.39.5