}\r
#endif\r
\r
+ if( ( void * ) pxCreatedTask != NULL )\r
+ {\r
+ /* Pass the TCB out - in an anonymous way. The calling function/\r
+ task can use this as a handle to delete the task later if\r
+ required.*/\r
+ *pxCreatedTask = ( xTaskHandle ) pxNewTCB;\r
+ }\r
+ \r
/* We are going to manipulate the task queues to add this task to a\r
ready list, so must make sure no interrupts occur. */\r
portENTER_CRITICAL();\r
\r
if( xReturn == pdPASS )\r
{\r
- if( ( void * ) pxCreatedTask != NULL )\r
- {\r
- /* Pass the TCB out - in an anonymous way. The calling function/\r
- task can use this as a handle to delete the task later if\r
- required.*/\r
- *pxCreatedTask = ( xTaskHandle ) pxNewTCB;\r
- }\r
-\r
if( xSchedulerRunning != pdFALSE )\r
{\r
/* If the created task is of a higher priority than the current task\r