]> git.sur5r.net Git - freertos/commitdiff
Update semtest.c to use xSemaphoreCreateBinary() in place of vSemaphoreCreateBinary.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 7 Nov 2013 11:11:18 +0000 (11:11 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 7 Nov 2013 11:11:18 +0000 (11:11 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2085 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

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