]> git.sur5r.net Git - freertos/blobdiff - Source/croutine.c
Slight mod to take into account different definitions between SafeRTOS and FreeRTOS...
[freertos] / Source / croutine.c
index 27ab0122b07b8515b02722fb27a98e93e7f5bc22..347319e7b25aa15dc24484d32b690a13adbfef24 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-       FreeRTOS.org V4.0.3 - Copyright (C) 2003-2006 Richard Barry.\r
+       FreeRTOS.org V4.1.3 - Copyright (C) 2003-2006 Richard Barry.\r
 \r
        This file is part of the FreeRTOS.org distribution.\r
 \r
@@ -51,8 +51,8 @@ static portTickType xCoRoutineTickCount = 0;
 #define corINITIAL_STATE       ( 0 )\r
 \r
 /*\r
- * Place the co-routine represented by pxCRCB into the appropriate ready queue \r
- * for the priority.  It is inserted at the end of the list.  \r
+ * Place the co-routine represented by pxCRCB into the appropriate ready queue\r
+ * for the priority.  It is inserted at the end of the list.\r
  *\r
  * This macro accesses the co-routine ready lists and therefore must not be\r
  * used from within an ISR.\r
@@ -81,20 +81,20 @@ static void prvInitialiseCoRoutineLists( void );
 static inline void prvCheckPendingReadyList( void );\r
 \r
 /*\r
- * Macro that looks at the list of co-routines that are currently delayed to \r
+ * Macro that looks at the list of co-routines that are currently delayed to\r
  * see if any require waking.\r
  *\r
- * Co-routines are stored in the queue in the order of their wake time - \r
- * meaning once one co-routine has been found whose timer has not expired \r
+ * Co-routines are stored in the queue in the order of their wake time -\r
+ * meaning once one co-routine has been found whose timer has not expired\r
  * we need not look any further down the list.\r
  */\r
 static inline void prvCheckDelayedList( void );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex )\r
+signed portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex )\r
 {\r
-portBASE_TYPE xReturn;\r
+signed portBASE_TYPE xReturn;\r
 corCRCB *pxCoRoutine;\r
 \r
        /* Allocate the memory that will store the co-routine control block. */\r
@@ -125,8 +125,8 @@ corCRCB *pxCoRoutine;
                vListInitialiseItem( &( pxCoRoutine->xGenericListItem ) );\r
                vListInitialiseItem( &( pxCoRoutine->xEventListItem ) );\r
 \r
-               /* Set the co-routine control block as a link back from the xListItem.  \r
-               This is so we can get back to the containing CRCB from a generic item \r
+               /* Set the co-routine control block as a link back from the xListItem.\r
+               This is so we can get back to the containing CRCB from a generic item\r
                in a list. */\r
                listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xGenericListItem ), pxCoRoutine );\r
                listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine );\r
@@ -190,7 +190,7 @@ portTickType xTimeToWake;
 static inline void prvCheckPendingReadyList( void )\r
 {\r
        /* Are there any co-routines waiting to get moved to the ready list?  These\r
-       are co-routines that have been readied by an ISR.  The ISR cannot access \r
+       are co-routines that have been readied by an ISR.  The ISR cannot access\r
        the     ready lists itself. */\r
        while( !listLIST_IS_EMPTY( &xPendingReadyList ) )\r
        {\r
@@ -244,9 +244,9 @@ corCRCB *pxCRCB;
 \r
                        portDISABLE_INTERRUPTS();\r
                        {\r
-                               /* The event could have occurred just before this critical \r
+                               /* The event could have occurred just before this critical\r
                                section.  If this is the case then the generic list item will\r
-                               have been moved to the pending ready list and the following \r
+                               have been moved to the pending ready list and the following\r
                                line is still valid.  Also the pvContainer parameter will have\r
                                been set to NULL so the following lines are also valid. */\r
                                vListRemove( &( pxCRCB->xGenericListItem ) );                                                                                   \r
@@ -310,17 +310,17 @@ unsigned portBASE_TYPE uxPriority;
        vListInitialise( ( xList * ) &xDelayedCoRoutineList2 );\r
        vListInitialise( ( xList * ) &xPendingReadyList );\r
 \r
-       /* Start with pxDelayedCoRoutineList using list1 and the \r
+       /* Start with pxDelayedCoRoutineList using list1 and the\r
        pxOverflowDelayedCoRoutineList using list2. */\r
        pxDelayedCoRoutineList = &xDelayedCoRoutineList1;\r
        pxOverflowDelayedCoRoutineList = &xDelayedCoRoutineList2;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList )\r
+signed portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList )\r
 {\r
 corCRCB *pxUnblockedCRCB;\r
-portBASE_TYPE xReturn;\r
+signed portBASE_TYPE xReturn;\r
 \r
        /* This function is called from within an interrupt.  It can only access\r
        event lists and the pending ready list. */\r