]> git.sur5r.net Git - freertos/commitdiff
Allow test to pass when there are many other tasks in the system.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 23 Mar 2008 16:07:48 +0000 (16:07 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 23 Mar 2008 16:07:48 +0000 (16:07 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@256 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/Minimal/recmutex.c

index c11dfa8ca5a64703161746a4e746a88c50a40d7e..f0fd9663ec87000ba951cdbdbae7f78be6a7fe4a 100644 (file)
@@ -95,7 +95,7 @@
 /* Misc. */\r
 #define recmuSHORT_DELAY                               ( 20 / portTICK_RATE_MS )\r
 #define recmuNO_DELAY                                  ( ( portTickType ) 0 )\r
-#define recmuONE_TICK_DELAY                            ( ( portTickType ) 1 )\r
+#define recmuTWO_TICK_DELAY                            ( ( portTickType ) 2 )\r
 \r
 /* The three tasks as described at the top of this file. */\r
 static void prvRecursiveMutexControllingTask( void *pvParameters );\r
@@ -150,7 +150,7 @@ unsigned portBASE_TYPE ux;
                        inherit our priority on all but the first cycle of this task. \r
                        If we did not block attempting to receive the mutex then no\r
                        priority inheritance would occur. */\r
-                       if( xSemaphoreTakeRecursive( xMutex, recmuONE_TICK_DELAY ) != pdPASS )\r
+                       if( xSemaphoreTakeRecursive( xMutex, recmuTWO_TICK_DELAY ) != pdPASS )\r
                        {\r
                                xErrorOccurred = pdTRUE;\r
                        }\r
@@ -176,7 +176,7 @@ unsigned portBASE_TYPE ux;
                }\r
 \r
                /* Having given it back the same number of times as it was taken, we\r
-               should no longer be the mutex owner, so the next give should fail. */\r
+               should no longer be the mutex owner, so the next give sh ould fail. */\r
                if( xSemaphoreGiveRecursive( xMutex ) == pdPASS )\r
                {\r
                        xErrorOccurred = pdTRUE;\r