]> git.sur5r.net Git - freertos/commitdiff
Update sys_arch.c for Xilinx Ethernet Lite IP.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 12 Sep 2011 21:13:25 +0000 (21:13 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 12 Sep 2011 21:13:25 +0000 (21:13 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1595 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/ethernet/lwip-1.4.0/ports/MicroBlaze-Ethernet-Lite/sys_arch.c

index 3c5bcba1bb72dbaab868592c148930154864acfd..8aecd5be31120d1874451478d985dc2165502439 100644 (file)
@@ -72,11 +72,7 @@ err_t xReturn = ERR_MEM;
        if( *pxMailBox != NULL )\r
        {\r
                xReturn = ERR_OK;\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( mbox.used );\r
-               }\r
-               #endif /* SYS_STATS */\r
+               SYS_STATS_INC_USED( mbox );\r
        }\r
 \r
        return xReturn;\r
@@ -165,11 +161,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
        {\r
                /* The queue was already full. */\r
                xReturn = ERR_MEM;\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( mbox.err );\r
-               }\r
-               #endif /* SYS_STATS */\r
+               SYS_STATS_INC( mbox.err );\r
        }\r
 \r
        return xReturn;\r
@@ -233,7 +225,7 @@ unsigned long ulReturn;
        }\r
        else\r
        {\r
-               while( pdTRUE != xQueueReceive( pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) );\r
+               while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) );\r
                xEndTime = xTaskGetTickCount();\r
                xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
 \r
@@ -322,20 +314,11 @@ err_t xReturn = ERR_MEM;
                }\r
 \r
                xReturn = ERR_OK;\r
-\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( sem.used );\r
-               }\r
-               #endif\r
+               SYS_STATS_INC_USED( sem );\r
        }\r
        else\r
        {\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( sem.err );\r
-               }\r
-               #endif\r
+               SYS_STATS_INC( sem.err );\r
        }\r
 \r
        return xReturn;\r
@@ -386,7 +369,7 @@ unsigned long ulReturn;
        }\r
        else\r
        {\r
-               while( xSemaphoreTake( pxSemaphore, portMAX_DELAY ) != pdTRUE );\r
+               while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE );\r
                xEndTime = xTaskGetTickCount();\r
                xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;\r
 \r
@@ -410,22 +393,14 @@ err_t xReturn = ERR_MEM;
 \r
        *pxMutex = xQueueCreateMutex();\r
 \r
-       if( *pxMutex != NULL )\r
+       if( *pxMutex != NULL ) \r
        {\r
                xReturn = ERR_OK;\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( mutex.used );\r
-               }\r
-               #endif\r
+               SYS_STATS_INC_USED( mutex );\r
        } \r
        else \r
        {\r
-               #if SYS_STATS\r
-               {\r
-                       SYS_STATS_INC( mutex.err );\r
-               }\r
-               #endif\r
+               SYS_STATS_INC( mutex.err );\r
        }\r
        \r
        return xReturn;\r
@@ -450,11 +425,7 @@ void sys_mutex_unlock(sys_mutex_t *pxMutex )
  * @param mutex the mutex to delete */\r
 void sys_mutex_free( sys_mutex_t *pxMutex )\r
 {\r
-       #if SYS_STATS\r
-       {\r
-               SYS_STATS_DEC( mutex.used );\r
-       }\r
-       #endif /* SYS_STATS */\r
+       SYS_STATS_DEC( mutex.used );\r
        vQueueDelete( *pxMutex );\r
 }\r
 \r
@@ -491,12 +462,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
  *---------------------------------------------------------------------------*/\r
 void sys_sem_free( sys_sem_t *pxSemaphore )\r
 {\r
-       #if SYS_STATS\r
-       {\r
-               SYS_STATS_DEC(sem.used);\r
-       }\r
-       #endif\r
-\r
+       SYS_STATS_DEC(sem.used);\r
        vQueueDelete( *pxSemaphore );\r
 }\r
 \r