Update semtest.c to use xSemaphoreCreateBinary() in place of vSemaphoreCreateBinary.

This commit is contained in:
Richard Barry 2013-11-07 11:11:18 +00:00
parent dcf261a3e6
commit 5aabe4f8fb

View file

@ -135,7 +135,8 @@ const portTickType xBlockTime = ( portTickType ) 100;
if( pxFirstSemaphoreParameters != NULL ) if( pxFirstSemaphoreParameters != NULL )
{ {
/* Create the semaphore used by the first two tasks. */ /* Create the semaphore used by the first two tasks. */
vSemaphoreCreateBinary( pxFirstSemaphoreParameters->xSemaphore ); pxFirstSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();
xSemaphoreGive( pxFirstSemaphoreParameters->xSemaphore );
if( pxFirstSemaphoreParameters->xSemaphore != NULL ) if( pxFirstSemaphoreParameters->xSemaphore != NULL )
{ {
@ -159,7 +160,8 @@ const portTickType xBlockTime = ( portTickType ) 100;
pxSecondSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) ); pxSecondSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );
if( pxSecondSemaphoreParameters != NULL ) if( pxSecondSemaphoreParameters != NULL )
{ {
vSemaphoreCreateBinary( pxSecondSemaphoreParameters->xSemaphore ); pxSecondSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();
xSemaphoreGive( pxSecondSemaphoreParameters->xSemaphore );
if( pxSecondSemaphoreParameters->xSemaphore != NULL ) if( pxSecondSemaphoreParameters->xSemaphore != NULL )
{ {