]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Core kernel code changes:
[freertos] / FreeRTOS / Source / queue.c
index 57bdcdbde2e5efce0afda4856b89c7fe09b9b6e3..3a6aea92a155fb7d211d48690a8770898fda50a8 100644 (file)
@@ -303,7 +303,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        it will be possible to write to it. */\r
                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                        {\r
-                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                {\r
                                        queueYIELD_IF_USING_PREEMPTION();\r
                                }\r
@@ -651,7 +651,7 @@ Queue_t *pxNewQueue;
                        /* pdPASS will only be returned if the mutex was successfully\r
                        obtained.  The calling task may have entered the Blocked state\r
                        before reaching here. */\r
-                       if( xReturn == pdPASS )\r
+                       if( xReturn != pdFAIL )\r
                        {\r
                                ( pxMutex->u.uxRecursiveCallCount )++;\r
                        }\r
@@ -732,7 +732,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )\r
                                                {\r
                                                        /* The queue is a member of a queue set, and posting\r
                                                        to the queue set caused a higher priority task to\r
@@ -750,7 +750,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                                queue then unblock it now. */\r
                                                if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                                {\r
-                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                        {\r
                                                                /* The unblocked task has a priority higher than\r
                                                                our own so yield immediately.  Yes it is ok to\r
@@ -783,7 +783,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        queue then unblock it now. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                {\r
                                                        /* The unblocked task has a priority higher than\r
                                                        our own so yield immediately.  Yes it is ok to do\r
@@ -920,7 +920,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        queue then unblock it now. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                {\r
                                                        /* The unblocked task has a priority higher than\r
                                                        our own so yield immediately. */\r
@@ -1031,7 +1031,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
 \r
                                                if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                                                {\r
-                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                                        {\r
                                                                portYIELD_WITHIN_API();\r
                                                        }\r
@@ -1191,7 +1191,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )\r
                                                {\r
                                                        /* The queue is a member of a queue set, and posting\r
                                                        to the queue set caused a higher priority task to\r
@@ -1352,7 +1352,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) != pdFALSE )\r
                                                {\r
                                                        /* The semaphore is a member of a queue set, and\r
                                                        posting to the queue set caused a higher priority\r
@@ -1506,7 +1506,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
 \r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                                {\r
                                                        queueYIELD_IF_USING_PREEMPTION();\r
                                                }\r
@@ -2019,7 +2019,7 @@ static void prvUnlockQueue( Queue_t * const pxQueue )
                        {\r
                                if( pxQueue->pxQueueSetContainer != NULL )\r
                                {\r
-                                       if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) == pdTRUE )\r
+                                       if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) != pdFALSE )\r
                                        {\r
                                                /* The queue is a member of a queue set, and posting to\r
                                                the queue set caused a higher priority task to unblock.\r
@@ -2033,8 +2033,9 @@ static void prvUnlockQueue( Queue_t * const pxQueue )
                                }\r
                                else\r
                                {\r
-                                       /* Tasks that are removed from the event list will get added to\r
-                                       the pending ready list as the scheduler is still suspended. */\r
+                                       /* Tasks that are removed from the event list will get\r
+                                       added to the pending ready list as the scheduler is still\r
+                                       suspended. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
                                                if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r