]> granicus.if.org Git - esp-idf/commitdiff
apptrace: Fixes tracing xQueueGiveFromISR
authorAlexey Gerenkov <alexey@espressif.com>
Mon, 19 Nov 2018 20:30:04 +0000 (23:30 +0300)
committerAlexey Gerenkov <alexey@espressif.com>
Mon, 1 Apr 2019 12:56:13 +0000 (15:56 +0300)
components/app_trace/sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.h
components/freertos/include/freertos/FreeRTOS.h
components/freertos/queue.c

index a13af030b6babdbf6e5abe8c4a3834cd837c079c..a66a91471e5b8f84643ccee6486fd88bed0efad7 100644 (file)
@@ -244,8 +244,10 @@ Notes:
   #define traceQUEUE_SEND( pxQueue )                                    SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0, 0, xCopyPosition)
 #endif
 #define traceQUEUE_SEND_FAILED( pxQueue )                             SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
-#define traceQUEUE_SEND_FROM_ISR( pxQueue )                           SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
-#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )                    SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
+#define traceQUEUE_SEND_FROM_ISR( pxQueue )                           SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, (U32)pxHigherPriorityTaskWoken, xCopyPosition)
+#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )                    SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, (U32)pxHigherPriorityTaskWoken, xCopyPosition)
+#define traceQUEUE_GIVE_FROM_ISR( pxQueue )                           SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
+#define traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue )                    SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
 
 #if( portSTACK_GROWTH < 0 )
 #define traceTASK_CREATE(pxNewTCB)                  if (pxNewTCB != NULL) {                                             \
index 486d9c329aab1ca2a04da83f8721c80f145b9a15..207e6534501ec8f952250f3439cd7ef19baa110a 100644 (file)
@@ -514,6 +514,14 @@ extern "C" {
        #define traceTASK_CREATE( pxNewTCB )
 #endif
 
+#ifndef traceQUEUE_GIVE_FROM_ISR
+       #define traceQUEUE_GIVE_FROM_ISR( pxQueue )
+#endif
+
+#ifndef traceQUEUE_GIVE_FROM_ISR_FAILED
+       #define traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue )
+#endif
+
 #ifndef traceTASK_CREATE_FAILED
        #define traceTASK_CREATE_FAILED()
 #endif
index 0107bbc10aa1296ba3dabfd45cf4c033cd361583..1859dbd1dd00f7935d6c3c5b866a2344ae4b2bc3 100644 (file)
@@ -1333,7 +1333,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                space'. */
                if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
                {
-                       traceQUEUE_SEND_FROM_ISR( pxQueue );
+                       traceQUEUE_GIVE_FROM_ISR( pxQueue );
 
                        /* A task can only have an inherited priority if it is a mutex
                        holder - and if there is a mutex holder then the mutex cannot be
@@ -1427,7 +1427,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                }
                else
                {
-                       traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
+                       traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue );
                        xReturn = errQUEUE_FULL;
                }
                taskEXIT_CRITICAL_ISR(&pxQueue->mux);