]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MSVC-MingW/port.c
Create minor optimisations (just an asm instruction or two) by using consts in a...
[freertos] / FreeRTOS / Source / portable / MSVC-MingW / port.c
index ad023f1eff4bfe861b5c6baad6a22a4c23cdeef2..08c50e9d5805759bbd64b85da751c091af6ec011 100644 (file)
@@ -88,13 +88,15 @@ Priorities are higher when a soak test is performed to lessen the effect of
 Windows interfering with the timing. */\r
 #define portSOAK_TEST\r
 #ifndef portSOAK_TEST\r
+       #define portDELETE_SELF_THREAD_PRIORITY                  THREAD_PRIORITY_HIGHEST /* Must be highest. */\r
        #define portSIMULATED_INTERRUPTS_THREAD_PRIORITY THREAD_PRIORITY_NORMAL\r
        #define portSIMULATED_TIMER_THREAD_PRIORITY              THREAD_PRIORITY_BELOW_NORMAL\r
        #define portTASK_THREAD_PRIORITY                                 THREAD_PRIORITY_IDLE\r
 #else\r
-       #define portSIMULATED_INTERRUPTS_THREAD_PRIORITY THREAD_PRIORITY_TIME_CRITICAL\r
-       #define portSIMULATED_TIMER_THREAD_PRIORITY              THREAD_PRIORITY_HIGHEST\r
-       #define portTASK_THREAD_PRIORITY                                 THREAD_PRIORITY_ABOVE_NORMAL\r
+       #define portDELETE_SELF_THREAD_PRIORITY                  THREAD_PRIORITY_TIME_CRITICAL /* Must be highest. */\r
+       #define portSIMULATED_INTERRUPTS_THREAD_PRIORITY THREAD_PRIORITY_HIGHEST\r
+       #define portSIMULATED_TIMER_THREAD_PRIORITY              THREAD_PRIORITY_ABOVE_NORMAL\r
+       #define portTASK_THREAD_PRIORITY                                 THREAD_PRIORITY_NORMAL\r
 #endif\r
 /*\r
  * Created as a high priority thread, this function uses a timer to simulate\r
@@ -516,7 +518,7 @@ uint32_t ulErrorCode;
        does not run and swap it out before it is closed.  If that were to happen\r
        the thread would never run again and effectively be a thread handle and\r
        memory leak. */\r
-       SetThreadPriority( pvThread, THREAD_PRIORITY_HIGHEST );\r
+       SetThreadPriority( pvThread, portDELETE_SELF_THREAD_PRIORITY );\r
 \r
        /* This function will not return, therefore a yield is set as pending to\r
        ensure a context switch occurs away from this thread on the next tick. */\r