]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/semtest.c
Update semtest.c to use xSemaphoreCreateBinary() in place of vSemaphoreCreateBinary.
[freertos] / FreeRTOS / Demo / Common / Minimal / semtest.c
index a146ad50626ccf8029c5505ca0ad31cdd6567730..9d1b822b91bffcd863eb8d64e11b0c0b9a4d017d 100644 (file)
@@ -135,7 +135,8 @@ const portTickType xBlockTime = ( portTickType ) 100;
        if( pxFirstSemaphoreParameters != NULL )\r
        {\r
                /* Create the semaphore used by the first two tasks. */\r
-               vSemaphoreCreateBinary( pxFirstSemaphoreParameters->xSemaphore );\r
+               pxFirstSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();\r
+               xSemaphoreGive( pxFirstSemaphoreParameters->xSemaphore );\r
 \r
                if( pxFirstSemaphoreParameters->xSemaphore != NULL )\r
                {\r
@@ -159,7 +160,8 @@ const portTickType xBlockTime = ( portTickType ) 100;
        pxSecondSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );\r
        if( pxSecondSemaphoreParameters != NULL )\r
        {\r
-               vSemaphoreCreateBinary( pxSecondSemaphoreParameters->xSemaphore );\r
+               pxSecondSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();\r
+               xSemaphoreGive( pxSecondSemaphoreParameters->xSemaphore );\r
 \r
                if( pxSecondSemaphoreParameters->xSemaphore != NULL )\r
                {\r