]> git.sur5r.net Git - freertos/commitdiff
Minor changes to the trace macros.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:37:26 +0000 (09:37 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 6 Apr 2008 09:37:26 +0000 (09:37 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@296 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/queue.c
Source/tasks.c

index 2c49c8360a8b8c7996f97f0c5d6dcfe427dc62e6..d043f95ecc2b48e2c0bbecd53cd2d9c70b737f77 100644 (file)
@@ -314,6 +314,8 @@ size_t xQueueSizeInBytes;
                mutual exclusion is required to test the pxMutexHolder variable. */\r
                if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )\r
                {\r
+                       traceGIVE_MUTEX_RECURSIVE( pxMutex );\r
+\r
                        /* uxRecursiveCallCount cannot be zero if pxMutexHolder is equal to\r
                        the task handle, therefore no underflow check is required.  Also,\r
                        uxRecursiveCallCount is only modified by the mutex holder, and as\r
@@ -329,9 +331,7 @@ size_t xQueueSizeInBytes;
                 xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );\r
                        }\r
 \r
-                       xReturn = pdPASS;\r
-\r
-                       traceGIVE_MUTEX_RECURSIVE( pxMutex );\r
+                       xReturn = pdPASS;                       \r
                }\r
                else\r
                {\r
@@ -356,6 +356,8 @@ size_t xQueueSizeInBytes;
                /* Comments regarding mutual exclusion as per those within\r
                xQueueGiveMutexRecursive(). */\r
 \r
+               traceTAKE_MUTEX_RECURSIVE( pxMutex );\r
+\r
                if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )\r
                {\r
                        ( pxMutex->uxRecursiveCallCount )++;\r
@@ -371,9 +373,7 @@ size_t xQueueSizeInBytes;
                        {\r
                                ( pxMutex->uxRecursiveCallCount )++;\r
                        }\r
-               }\r
-\r
-               traceTAKE_MUTEX_RECURSIVE( pxMutex );\r
+               }               \r
 \r
                return xReturn;\r
        }\r
index 065004b4a14be4aa6ae54428289280716fe08619..994c23387f646741b67800ecc08e76aefef79453 100644 (file)
@@ -1414,6 +1414,8 @@ inline void vTaskIncrementTick( void )
 \r
 void vTaskSwitchContext( void )\r
 {\r
+       traceTASK_SWITCHED_OUT();\r
+\r
        if( uxSchedulerSuspended != ( unsigned portBASE_TYPE ) pdFALSE )\r
        {\r
                /* The scheduler is currently suspended - do not allow a context\r