Correct definition of StaticTask_t in the case that portUSE_MPU_WRAPPERS is set to 1.
prvTaskCheckFreeStackSpace() now returns configSTACK_DEPTH_TYPE to allow return values greater than max uint16_t value if required.
xStreamBufferSend() and xStreamBufferReceive() no longer clear task notification bits - clearing was unnecessary as only the task notification state is used.
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2527
1d2547de-c912-0410-9cb9-
b8ca96c0e9e2
{\r
xResult = -pdFREERTOS_ERRNO_ENOMEM;\r
}\r
- else if( pxSocket->u.xTCP.ucTCPState == eCLOSED )\r
+ else if( ( pxSocket->u.xTCP.ucTCPState == eCLOSED ) ||\r
+ ( pxSocket->u.xTCP.ucTCPState == eCLOSE_WAIT ) ||\r
+ ( pxSocket->u.xTCP.ucTCPState == eCLOSING ) )\r
{\r
xResult = -pdFREERTOS_ERRNO_ENOTCONN;\r
}\r
uint32_t ulDummy18;\r
uint8_t ucDummy19;\r
#endif\r
- #if( ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) || ( portUSING_MPU_WRAPPERS == 1 ) )\r
+ #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
uint8_t uxDummy20;\r
#endif\r
\r
UBaseType_t uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */\r
uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */\r
StackType_t *pxStackBase; /* Points to the lowest address of the task's stack area. */\r
- uint16_t usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */\r
+ configSTACK_DEPTH_TYPE usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */\r
} TaskStatus_t;\r
\r
/* Possible return values for eTaskConfirmSleepModeStatus(). */\r
taskEXIT_CRITICAL();\r
\r
traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer );\r
- ( void ) xTaskNotifyWait( ( uint32_t ) 0, UINT32_MAX, NULL, xTicksToWait );\r
+ ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait );\r
pxStreamBuffer->xTaskWaitingToSend = NULL;\r
\r
} while( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE );\r
{\r
/* Wait for data to be available. */\r
traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer );\r
- ( void ) xTaskNotifyWait( ( uint32_t ) 0, UINT32_MAX, NULL, xTicksToWait );\r
+ ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait );\r
pxStreamBuffer->xTaskWaitingToReceive = NULL;\r
\r
/* Recheck the data available after blocking. */\r
*/\r
#if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) )\r
\r
- static uint16_t prvTaskCheckFreeStackSpace( const uint8_t * pucStackByte ) PRIVILEGED_FUNCTION;\r
+ static configSTACK_DEPTH_TYPE prvTaskCheckFreeStackSpace( const uint8_t * pucStackByte ) PRIVILEGED_FUNCTION;\r
\r
#endif\r
\r
uxPriority &= ~portPRIVILEGE_BIT;\r
#endif /* portUSING_MPU_WRAPPERS == 1 */\r
\r
+ configASSERT( pcName );\r
+\r
/* Avoid dependency on memset() if it is not required. */\r
#if( tskSET_NEW_STACKS_TO_KNOWN_VALUE == 1 )\r
{\r
\r
#if ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) )\r
\r
- static uint16_t prvTaskCheckFreeStackSpace( const uint8_t * pucStackByte )\r
+ static configSTACK_DEPTH_TYPE prvTaskCheckFreeStackSpace( const uint8_t * pucStackByte )\r
{\r
uint32_t ulCount = 0U;\r
\r
\r
ulCount /= ( uint32_t ) sizeof( StackType_t ); /*lint !e961 Casting is not redundant on smaller architectures. */\r
\r
- return ( uint16_t ) ulCount;\r
+ return ( configSTACK_DEPTH_TYPE ) ulCount;\r
}\r
\r
#endif /* ( ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) ) */\r