]> git.sur5r.net Git - freertos/commitdiff
Change the terminology from 'pseudo' to 'simulated' in the Win32 port layer.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 8 Dec 2010 17:10:25 +0000 (17:10 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 8 Dec 2010 17:10:25 +0000 (17:10 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1168 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/MSVC-MingW/port.c
Source/portable/MSVC-MingW/portmacro.h

index 24b4577af5142040f2054e68069e70fc132f7913..6c3727a6ccd232e12eeaaa98735ef9e69189451e 100644 (file)
@@ -71,11 +71,11 @@ static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter );
  * Process all the simulated interrupts - each represented by a bit in \r
  * ulPendingInterrupts variable.\r
  */\r
-static void prvProcessPseudoInterrupts( void );\r
+static void prvProcessSimulatedInterrupts( void );\r
 \r
 /*\r
  * Interrupt handlers used by the kernel itself.  These are executed from the\r
- * pseudo interrupt handler thread.\r
+ * simulated interrupt handler thread.\r
  */\r
 static unsigned long prvProcessDeleteThreadInterrupt( void );\r
 static unsigned long prvProcessYieldInterrupt( void );\r
@@ -95,16 +95,16 @@ typedef struct
 \r
 } xThreadState;\r
 \r
-/* Pseudo interrupts waiting to be processed.  This is a bit mask where each\r
+/* Simulated interrupts waiting to be processed.  This is a bit mask where each\r
 bit represents one interrupt, so a maximum of 32 interrupts can be simulated. */\r
 static volatile unsigned long ulPendingInterrupts = 0UL;\r
 \r
-/* An event used to inform the pseudo interrupt processing thread (a high \r
+/* An event used to inform the simulated interrupt processing thread (a high \r
 priority thread that simulated interrupt processing) that an interrupt is\r
 pending. */\r
 static void *pvInterruptEvent = NULL;\r
 \r
-/* Mutex used to protect all the pseudo interrupt variables that are accessed \r
+/* Mutex used to protect all the simulated interrupt variables that are accessed \r
 by multiple threads. */\r
 static void *pvInterruptEventMutex = NULL;\r
 \r
@@ -113,7 +113,7 @@ initialised to a non-zero value so interrupts do not become enabled during
 the initialisation phase.  As each task has its own critical nesting value \r
 ulCriticalNesting will get set to zero when the first task runs.  This \r
 initialisation is probably not critical in this simulated environment as the\r
-pseudo interrupt handlers do not get created until the FreeRTOS scheduler is \r
+simulated interrupt handlers do not get created until the FreeRTOS scheduler is \r
 started anyway. */\r
 static unsigned long ulCriticalNesting = 9999UL;\r
 \r
@@ -134,7 +134,7 @@ static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter )
 \r
        for(;;)\r
        {\r
-               /* Wait until the timer expires and we can access the pseudo interrupt \r
+               /* Wait until the timer expires and we can access the simulated interrupt \r
                variables.  *NOTE* this is not a 'real time' way of generating tick \r
                events as the next wake time should be relative to the previous wake \r
                time, not the time that Sleep() is called.  It is done this way to \r
@@ -151,7 +151,7 @@ static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter )
                handler thread. */\r
                SetEvent( pvInterruptEvent );\r
 \r
-               /* Give back the mutex so the pseudo interrupt handler unblocks \r
+               /* Give back the mutex so the simulated interrupt handler unblocks \r
                and can access the interrupt handler variables. */\r
                ReleaseMutex( pvInterruptEventMutex );\r
        }\r
@@ -209,7 +209,7 @@ xThreadState *pxThreadState;
 \r
        /* Set the priority of this thread such that it is above the priority of \r
        the threads that run tasks.  This higher priority is required to ensure\r
-       pseudo interrupts take priority over tasks. */\r
+       simulated interrupts take priority over tasks. */\r
        pvHandle = GetCurrentThread();\r
        if( pvHandle == NULL )\r
        {\r
@@ -229,7 +229,7 @@ xThreadState *pxThreadState;
        if( lSuccess == pdPASS )\r
        {\r
                /* Start the thread that simulates the timer peripheral to generate\r
-               tick interrupts.  The priority is set below that of the pseudo \r
+               tick interrupts.  The priority is set below that of the simulated \r
                interrupt handler so the interrupt event mutex is used for the\r
                handshake / overrun protection. */\r
                pvHandle = CreateThread( NULL, 0, prvSimulatedPeripheralTimer, NULL, 0, NULL );\r
@@ -250,12 +250,12 @@ xThreadState *pxThreadState;
                behave as an embedded engineer might expect. */\r
                ResumeThread( pxThreadState->pvThread );\r
 \r
-               /* Handle all pseudo interrupts - including yield requests and \r
+               /* Handle all simulated interrupts - including yield requests and \r
                simulated ticks. */\r
-               prvProcessPseudoInterrupts();\r
+               prvProcessSimulatedInterrupts();\r
        }       \r
        \r
-       /* Would not expect to return from prvProcessPseudoInterrupts(), so should \r
+       /* Would not expect to return from prvProcessSimulatedInterrupts(), so should \r
        not get here. */\r
        return 0;\r
 }\r
@@ -295,14 +295,14 @@ unsigned long ulSwitchRequired;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvProcessPseudoInterrupts( void )\r
+static void prvProcessSimulatedInterrupts( void )\r
 {\r
 unsigned long ulSwitchRequired, i;\r
 xThreadState *pxThreadState;\r
 void *pvObjectList[ 2 ];\r
 \r
-       /* Going to block on the mutex that ensured exclusive access to the pseudo \r
-       interrupt objects, and the event that signals that a pseudo interrupt\r
+       /* Going to block on the mutex that ensured exclusive access to the simulated \r
+       interrupt objects, and the event that signals that a simulated interrupt\r
        should be processed. */\r
        pvObjectList[ 0 ] = pvInterruptEventMutex;\r
        pvObjectList[ 1 ] = pvInterruptEvent;\r
@@ -311,7 +311,7 @@ void *pvObjectList[ 2 ];
        {\r
                WaitForMultipleObjects( sizeof( pvObjectList ) / sizeof( void * ), pvObjectList, TRUE, INFINITE );\r
 \r
-               /* Used to indicate whether the pseudo interrupt processing has\r
+               /* Used to indicate whether the simulated interrupt processing has\r
                necessitated a context switch to another task/thread. */\r
                ulSwitchRequired = pdFALSE;\r
 \r
@@ -319,7 +319,7 @@ void *pvObjectList[ 2 ];
                represented by a bit in the 32bit ulPendingInterrupts variable. */\r
                for( i = 0; i < portMAX_INTERRUPTS; i++ )\r
                {\r
-                       /* Is the pseudo interrupt pending? */\r
+                       /* Is the simulated interrupt pending? */\r
                        if( ulPendingInterrupts & ( 1UL << i ) )\r
                        {\r
                                /* Is a handler installed? */\r
@@ -382,8 +382,8 @@ xThreadState *pxThreadState;
        {\r
                /* The task is deleting itself, and so the thread that is running now\r
                is also to be deleted.  This has to be deferred until this thread is\r
-               no longer running, so its done in the pseudo interrupt handler thread. */\r
-               vPortGeneratePseudoInterrupt( portINTERRUPT_DELETE_THREAD );\r
+               no longer running, so its done in the simulated interrupt handler thread. */\r
+               vPortGenerateSimulatedInterrupt( portINTERRUPT_DELETE_THREAD );\r
        }\r
        else\r
        {\r
@@ -405,7 +405,7 @@ void vPortEndScheduler( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vPortGeneratePseudoInterrupt( unsigned long ulInterruptNumber )\r
+void vPortGenerateSimulatedInterrupt( unsigned long ulInterruptNumber )\r
 {\r
 xThreadState *pxThreadState;\r
 \r
@@ -415,7 +415,7 @@ xThreadState *pxThreadState;
                WaitForSingleObject( pvInterruptEventMutex, INFINITE );\r
                ulPendingInterrupts |= ( 1 << ulInterruptNumber );\r
 \r
-               /* The pseudo interrupt is now held pending, but don't actually process it\r
+               /* The simulated interrupt is now held pending, but don't actually process it\r
                yet if this call is within a critical section.  It is possible for this to\r
                be in a critical section as calls to wait for mutexes are accumulative. */\r
                if( ulCriticalNesting == 0 )\r
@@ -454,7 +454,7 @@ void vPortEnterCritical( void )
        if( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED )\r
        {\r
                /* The interrupt event mutex is held for the entire critical section,\r
-               effectively disabling (pseudo) interrupts. */\r
+               effectively disabling (simulated) interrupts. */\r
                WaitForSingleObject( pvInterruptEventMutex, INFINITE );\r
                ulCriticalNesting++;\r
        }\r
@@ -482,7 +482,7 @@ long lMutexNeedsReleasing;
                        ulCriticalNesting--;\r
 \r
                        /* Were any interrupts set to pending while interrupts were \r
-                       (pseudo) disabled? */\r
+                       (simulated) disabled? */\r
                        if( ulPendingInterrupts != 0UL )\r
                        {\r
                                SetEvent( pvInterruptEvent );\r
index a83fbd17a59068479d6c3c45fffcd5e4280c1510..cd1c7ab3af19987c27fb7cb3b6d88c7605bd56fd 100644 (file)
@@ -81,7 +81,7 @@
 #define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )  \r
 #define portBYTE_ALIGNMENT                     4\r
 \r
-#define portYIELD()                                    vPortGeneratePseudoInterrupt( portINTERRUPT_YIELD )\r
+#define portYIELD()                                    vPortGenerateSimulatedInterrupt( portINTERRUPT_YIELD )\r
 \r
 void vPortDeleteThread( void *pvThreadToDelete );\r
 #define traceTASK_DELETE( pxTCB )      vPortDeleteThread( pxTCB )\r
@@ -109,10 +109,10 @@ void vPortExitCritical( void );
  * Each bit can be used to represent an individual interrupt - with the first\r
  * two bits being used for the Yield and Tick interrupts respectively.\r
 */\r
-void vPortGeneratePseudoInterrupt( unsigned long ulInterruptNumber );\r
+void vPortGenerateSimulatedInterrupt( unsigned long ulInterruptNumber );\r
 \r
 /*\r
- * Install an interrupt handler to be called by the pseudo interrupt handler \r
+ * Install an interrupt handler to be called by the simulated interrupt handler \r
  * thread.  The interrupt number must be above any used by the kernel itself\r
  * (at the time of writing the kernel was using interrupt numbers 0, 1, and 2\r
  * as defined above).  The number must also be lower than 32. \r