]> git.sur5r.net Git - freertos/commitdiff
Add in the configUSE_APPLICATION_TASK_HOOK macro.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 12 Apr 2008 09:50:30 +0000 (09:50 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 12 Apr 2008 09:50:30 +0000 (09:50 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@303 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/PC/FreeRTOSConfig.h
Demo/PC/rtosdemo.tgt
Demo/PC/rtosdemo.wpj
Demo/PC/serial/serial.c

index 9c5eb84324cd0ceac6973eb6ff45cadfdcb3231b..e150a3ba6f3c470dc9dc6975af13d9b2a413c4cb 100644 (file)
@@ -79,6 +79,7 @@
 #define configUSE_ALTERNATIVE_API              1\r
 #define configUSE_RECURSIVE_MUTEXES            1\r
 #define configCHECK_FOR_STACK_OVERFLOW 0 /* Do not use this option on the PC port. */\r
+#define configUSE_APPLICATION_TASK_HOOK        1\r
 \r
 #define configMAX_PRIORITIES           ( ( unsigned portBASE_TYPE ) 10 )\r
 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
index e6a005d9382524ff10fa6ae1065ef4ec948e9d37..0cbfabb01d29b2f5a60f3bbbe815d2246c4f0012 100644 (file)
@@ -75,7 +75,7 @@ WVList
 0\r
 19\r
 WPickList\r
-64\r
+65\r
 20\r
 MItem\r
 3\r
@@ -1012,8 +1012,8 @@ WVList
 0\r
 236\r
 MItem\r
-27\r
-..\..\source\include\list.h\r
+31\r
+..\..\SOURCE\INCLUDE\FreeRTOS.h\r
 237\r
 WString\r
 3\r
@@ -1030,8 +1030,8 @@ WVList
 0\r
 240\r
 MItem\r
-31\r
-..\..\source\include\portable.h\r
+27\r
+..\..\source\include\list.h\r
 241\r
 WString\r
 3\r
@@ -1049,7 +1049,7 @@ WVList
 244\r
 MItem\r
 31\r
-..\..\source\include\projdefs.h\r
+..\..\source\include\portable.h\r
 245\r
 WString\r
 3\r
@@ -1066,8 +1066,8 @@ WVList
 0\r
 248\r
 MItem\r
-28\r
-..\..\source\include\queue.h\r
+31\r
+..\..\source\include\projdefs.h\r
 249\r
 WString\r
 3\r
@@ -1084,8 +1084,8 @@ WVList
 0\r
 252\r
 MItem\r
-29\r
-..\..\source\include\semphr.h\r
+28\r
+..\..\source\include\queue.h\r
 253\r
 WString\r
 3\r
@@ -1102,8 +1102,8 @@ WVList
 0\r
 256\r
 MItem\r
-27\r
-..\..\source\include\task.h\r
+29\r
+..\..\source\include\semphr.h\r
 257\r
 WString\r
 3\r
@@ -1120,8 +1120,8 @@ WVList
 0\r
 260\r
 MItem\r
-55\r
-..\..\source\portable\owatcom\16bitdos\common\portasm.h\r
+27\r
+..\..\source\include\task.h\r
 261\r
 WString\r
 3\r
@@ -1138,8 +1138,8 @@ WVList
 0\r
 264\r
 MItem\r
-53\r
-..\..\source\portable\owatcom\16bitdos\pc\portmacro.h\r
+55\r
+..\..\source\portable\owatcom\16bitdos\common\portasm.h\r
 265\r
 WString\r
 3\r
@@ -1156,8 +1156,8 @@ WVList
 0\r
 268\r
 MItem\r
-28\r
-..\COMMON\INCLUDE\AltBlckQ.h\r
+53\r
+..\..\source\portable\owatcom\16bitdos\pc\portmacro.h\r
 269\r
 WString\r
 3\r
@@ -1175,7 +1175,7 @@ WVList
 272\r
 MItem\r
 28\r
-..\COMMON\INCLUDE\AltBlock.h\r
+..\COMMON\INCLUDE\AltBlckQ.h\r
 273\r
 WString\r
 3\r
@@ -1193,7 +1193,7 @@ WVList
 276\r
 MItem\r
 28\r
-..\COMMON\INCLUDE\AltPollQ.h\r
+..\COMMON\INCLUDE\AltBlock.h\r
 277\r
 WString\r
 3\r
@@ -1211,7 +1211,7 @@ WVList
 280\r
 MItem\r
 28\r
-..\COMMON\INCLUDE\AltQTest.h\r
+..\COMMON\INCLUDE\AltPollQ.h\r
 281\r
 WString\r
 3\r
@@ -1228,8 +1228,8 @@ WVList
 0\r
 284\r
 MItem\r
-26\r
-..\common\include\blockq.h\r
+28\r
+..\COMMON\INCLUDE\AltQTest.h\r
 285\r
 WString\r
 3\r
@@ -1246,8 +1246,8 @@ WVList
 0\r
 288\r
 MItem\r
-28\r
-..\COMMON\INCLUDE\blocktim.h\r
+26\r
+..\common\include\blockq.h\r
 289\r
 WString\r
 3\r
@@ -1264,8 +1264,8 @@ WVList
 0\r
 292\r
 MItem\r
-27\r
-..\common\include\comtest.h\r
+28\r
+..\COMMON\INCLUDE\blocktim.h\r
 293\r
 WString\r
 3\r
@@ -1282,8 +1282,8 @@ WVList
 0\r
 296\r
 MItem\r
-28\r
-..\COMMON\INCLUDE\countsem.h\r
+27\r
+..\common\include\comtest.h\r
 297\r
 WString\r
 3\r
@@ -1300,8 +1300,8 @@ WVList
 0\r
 300\r
 MItem\r
-26\r
-..\COMMON\INCLUDE\crhook.h\r
+28\r
+..\COMMON\INCLUDE\countsem.h\r
 301\r
 WString\r
 3\r
@@ -1318,8 +1318,8 @@ WVList
 0\r
 304\r
 MItem\r
-25\r
-..\common\include\death.h\r
+26\r
+..\COMMON\INCLUDE\crhook.h\r
 305\r
 WString\r
 3\r
@@ -1336,8 +1336,8 @@ WVList
 0\r
 308\r
 MItem\r
-27\r
-..\COMMON\INCLUDE\dynamic.h\r
+25\r
+..\common\include\death.h\r
 309\r
 WString\r
 3\r
@@ -1354,8 +1354,8 @@ WVList
 0\r
 312\r
 MItem\r
-26\r
-..\common\include\fileio.h\r
+27\r
+..\COMMON\INCLUDE\dynamic.h\r
 313\r
 WString\r
 3\r
@@ -1372,8 +1372,8 @@ WVList
 0\r
 316\r
 MItem\r
-25\r
-..\common\include\flash.h\r
+26\r
+..\common\include\fileio.h\r
 317\r
 WString\r
 3\r
@@ -1390,8 +1390,8 @@ WVList
 0\r
 320\r
 MItem\r
-24\r
-..\common\include\flop.h\r
+25\r
+..\common\include\flash.h\r
 321\r
 WString\r
 3\r
@@ -1408,8 +1408,8 @@ WVList
 0\r
 324\r
 MItem\r
-28\r
-..\COMMON\INCLUDE\GenQTest.h\r
+24\r
+..\common\include\flop.h\r
 325\r
 WString\r
 3\r
@@ -1426,8 +1426,8 @@ WVList
 0\r
 328\r
 MItem\r
-27\r
-..\common\include\partest.h\r
+28\r
+..\COMMON\INCLUDE\GenQTest.h\r
 329\r
 WString\r
 3\r
@@ -1444,8 +1444,8 @@ WVList
 0\r
 332\r
 MItem\r
-25\r
-..\common\include\pollq.h\r
+27\r
+..\common\include\partest.h\r
 333\r
 WString\r
 3\r
@@ -1463,7 +1463,7 @@ WVList
 336\r
 MItem\r
 25\r
-..\common\include\print.h\r
+..\common\include\pollq.h\r
 337\r
 WString\r
 3\r
@@ -1480,8 +1480,8 @@ WVList
 0\r
 340\r
 MItem\r
-27\r
-..\common\include\semtest.h\r
+25\r
+..\common\include\print.h\r
 341\r
 WString\r
 3\r
@@ -1498,8 +1498,8 @@ WVList
 0\r
 344\r
 MItem\r
-26\r
-..\common\include\serial.h\r
+27\r
+..\common\include\semtest.h\r
 345\r
 WString\r
 3\r
@@ -1516,8 +1516,8 @@ WVList
 0\r
 348\r
 MItem\r
-16\r
-FreeRTOSConfig.h\r
+26\r
+..\common\include\serial.h\r
 349\r
 WString\r
 3\r
@@ -1532,3 +1532,21 @@ WVList
 1\r
 1\r
 0\r
+352\r
+MItem\r
+16\r
+FreeRTOSConfig.h\r
+353\r
+WString\r
+3\r
+NIL\r
+354\r
+WVList\r
+0\r
+355\r
+WVList\r
+0\r
+228\r
+1\r
+1\r
+0\r
index 34b752148993f2aede0b2797a786e05c2c0209dd..78b602ce832a070e97d05f5d52ca0d8d9e59f92d 100644 (file)
@@ -6,7 +6,7 @@ VpeMain
 WRect\r
 0\r
 0\r
-6202\r
+6195\r
 7168\r
 2\r
 MProject\r
@@ -38,6 +38,6 @@ WRect
 WFileName\r
 12\r
 rtosdemo.tgt\r
-6\r
-63\r
+0\r
+7\r
 7\r
index fdcf254c634d0983e8c3870a165b8422f2f86bff..f4b8afb8ec31c010efba4992b937a5ad3f625c20 100644 (file)
@@ -513,7 +513,7 @@ static portSHORT sComPortISR( const xComPort * const pxPort )
 {\r
 portSHORT sInterruptID;\r
 portCHAR cIn, cOut;\r
-portBASE_TYPE xTaskWokenByPost = pdFALSE, xAnotherTaskWokenByPost = pdFALSE, xTaskWokenByTx = pdFALSE;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
 extern void vComTestUnsuspendTask( void );\r
 \r
        portOUTPUT_BYTE( pxPort->us8259InterruptMaskReg, ( portINPUT_BYTE( pxPort->us8259InterruptMaskReg) | ~pxPort->ucInterruptEnableMast ) );\r
@@ -536,13 +536,13 @@ extern void vComTestUnsuspendTask( void );
                                                do\r
                                                {\r
                                                        cIn = ( portCHAR ) portINPUT_BYTE( pxPort->usReceiveDataRegister );                                             \r
-                                                       xTaskWokenByPost = xQueueSendFromISR( pxPort->xRxedChars, &cIn, xTaskWokenByPost );\r
+                                                       xQueueSendFromISR( pxPort->xRxedChars, &cIn, &xHigherPriorityTaskWoken );\r
 \r
                                                        /* Also release the semaphore - this does nothing interesting and is just a test.\r
                                                        We first attempt to unsuspend the task to check the scheduler correctely detects\r
                                                        this as an invalid call, then give the semaphore for real. */\r
                                                        vComTestUnsuspendTask();\r
-                                                       xAnotherTaskWokenByPost = xSemaphoreGiveFromISR( pxPort->xTestSem, xAnotherTaskWokenByPost );\r
+                                                       xSemaphoreGiveFromISR( pxPort->xTestSem, &xHigherPriorityTaskWoken );\r
 \r
                                                } while( portINPUT_BYTE( pxPort->usLineStatusReg ) & 0x01 );\r
                                                break;\r
@@ -559,19 +559,19 @@ extern void vComTestUnsuspendTask( void );
                                                do\r
                                                {\r
                                                        cIn = ( portCHAR ) portINPUT_BYTE( pxPort->usReceiveDataRegister );                                             \r
-                                                       xTaskWokenByPost = xQueueSendFromISR( pxPort->xRxedChars, &cIn, xTaskWokenByPost );\r
+                                                       xQueueSendFromISR( pxPort->xRxedChars, &cIn, &xHigherPriorityTaskWoken );\r
 \r
                                                        /* Also release the semaphore - this does nothing interesting and is just a test.\r
                                                        We first attempt to unsuspend the task to check the scheduler correctely detects\r
                                                        this as an invalid call, then give the semaphore for real. */\r
                                                        vComTestUnsuspendTask();\r
-                                                       xAnotherTaskWokenByPost = xSemaphoreGiveFromISR( pxPort->xTestSem, xAnotherTaskWokenByPost );\r
+                                                       xSemaphoreGiveFromISR( pxPort->xTestSem, &xHigherPriorityTaskWoken );\r
 \r
                                                } while( portINPUT_BYTE( pxPort->usLineStatusReg ) & 0x01 );\r
                                                break;\r
 \r
                        case 0x02:      /* serTRANSMIT_HOLD_EMPTY_INT */\r
-                                               if( xQueueReceiveFromISR( pxPort->xCharsForTx, &cOut, &xTaskWokenByTx ) != pdTRUE )                                             \r
+                                               if( xQueueReceiveFromISR( pxPort->xCharsForTx, &cOut, &xHigherPriorityTaskWoken ) != pdTRUE )                                           \r
                                                {                                                                                                                                                                               \r
                                                        /* Queue empty, nothing to send */                                                                                                      \r
                                                        vInterruptOff( pxPort, serTRANSMIT_HOLD_EMPTY_INT);                                                                     \r
@@ -607,14 +607,7 @@ extern void vComTestUnsuspendTask( void );
        /* If posting any of the characters to a queue woke a task that was blocked on\r
        the queue we may want to return to the task just woken (depending on its \r
        priority relative to the task this ISR interrupted. */\r
-       if( xTaskWokenByPost || xAnotherTaskWokenByPost || xTaskWokenByTx )\r
-       {\r
-               return pdTRUE;\r
-       }\r
-       else\r
-       {\r
-               return pdFALSE;\r
-       }\r
+       return xHigherPriorityTaskWoken;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r