diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-28 20:11:32 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-28 20:11:32 +0100 |
commit | 9e05eaaf91c2596521e29b90ffa9adf3114c3b93 (patch) | |
tree | 150d5d7fdbb6d9fbb93a4c1277a8132e1e423a07 /FreeRTOS | |
parent | a0f170eb2100291429d31a057977a88ece219519 (diff) |
Proper mutex usage, and protecting malloc and sbrk using them. Also showing this into the demo.
Diffstat (limited to 'FreeRTOS')
-rw-r--r-- | FreeRTOS/Source/queue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/FreeRTOS/Source/queue.c b/FreeRTOS/Source/queue.c index a62d179..b34e102 100644 --- a/FreeRTOS/Source/queue.c +++ b/FreeRTOS/Source/queue.c @@ -53,6 +53,7 @@ #include <stdlib.h>
#include <string.h>
+#include <osdebug.h> /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
all the API functions to use the MPU wrappers. That should only be done when
@@ -1092,11 +1093,20 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void *pvBuffer ) {
if( pxQueue->uxQueueType != queueQUEUE_IS_MUTEX )
{
+ DBGOUT("ret: %p\r\n", __builtin_return_address(0)); + DBGOUT("pxQueue: %p\r\n", pxQueue); + DBGOUT("pxQueue->uxQueueType: %d\r\n", pxQueue->uxQueueType); + DBGOUT("pxQueue->pcReadFrom: %p\r\n", pxQueue->pcReadFrom); + DBGOUT("pxQueue->uxItemSize: %d\r\n", pxQueue->uxItemSize); pxQueue->pcReadFrom += pxQueue->uxItemSize;
+ DBGOUT("pxQueue->pcReadFrom: %p\r\n", pxQueue->pcReadFrom); if( pxQueue->pcReadFrom >= pxQueue->pcTail )
{
pxQueue->pcReadFrom = pxQueue->pcHead;
}
+ DBGOUT("pxQueue->pcHead: %p\r\n", pxQueue->pcHead); + DBGOUT("pxQueue->pcReadFrom: %p\r\n", pxQueue->pcReadFrom); + DBGOUT("pvBuffer: %p\r\n", pvBuffer); memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned ) pxQueue->uxItemSize );
}
}
|