lwip: Fix FreeRTOS related issues in lwip

Fix various issues related to new FreeRTOS port in lwip.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Acked-by: Harini Katakam <harinik@xilinx.com>
This commit is contained in:
Anirudha Sarangi 2015-09-11 04:29:14 +05:30 committed by Nava kishore Manne
parent 18a8502391
commit c3b892c57a
2 changed files with 15 additions and 15 deletions

View file

@ -446,13 +446,13 @@ proc generate_lwip_opts {libhandle} {
if { [string compare -nocase "freertos821_xilinx" $os_name] == 0} {
puts $lwipopts_fd "\#define OS_IS_FREERTOS"
puts $lwipopts_fd "\#define DEFAULT_THREAD_PRIO $thread_prio"
puts $lwipopts_fd "\#define TCPIP_THREAD_PRIO (DEFAULT_THREAD_PRIO+1)"
puts $lwipopts_fd "\#define TCPIP_THREAD_STACKSIZE 32768"
puts $lwipopts_fd "\#define DEFAULT_TCP_RECVMBOX_SIZE 300"
puts $lwipopts_fd "\#define TCPIP_THREAD_PRIO ($thread_prio + 1)"
puts $lwipopts_fd "\#define TCPIP_THREAD_STACKSIZE 4096"
puts $lwipopts_fd "\#define DEFAULT_TCP_RECVMBOX_SIZE 200"
puts $lwipopts_fd "\#define DEFAULT_ACCEPTMBOX_SIZE 5"
puts $lwipopts_fd "\#define TCPIP_MBOX_SIZE 30"
puts $lwipopts_fd "\#define TCPIP_MBOX_SIZE 200"
puts $lwipopts_fd "\#define DEFAULT_UDP_RECVMBOX_SIZE 100"
puts $lwipopts_fd "\#define DEFAULT_RAW_RECVMBOX_SIZE 100"
puts $lwipopts_fd "\#define DEFAULT_RAW_RECVMBOX_SIZE 30"
puts $lwipopts_fd ""
}
}

View file

@ -551,7 +551,7 @@ void sys_mbox_post( sys_mbox_t *pxMailBox, void *pxMessageToPost )
if( xInsideISR != pdFALSE ) {
xQueueSendToBackFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -580,7 +580,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -653,7 +653,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;
ulReturn = xElapsed;
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -682,7 +682,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
if( xInsideISR != pdFALSE ) {
xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -731,7 +731,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -824,7 +824,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;
ulReturn = xElapsed;
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -849,7 +849,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
if( xInsideISR != pdFALSE ) {
xSemaphoreTakeFromISR( *pxSemaphore, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -899,7 +899,7 @@ void sys_mutex_lock( sys_mutex_t *pxMutex )
if( xInsideISR != pdFALSE ) {
xSemaphoreTakeFromISR( *pxMutex, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else
@ -914,7 +914,7 @@ void sys_mutex_unlock(sys_mutex_t *pxMutex )
if( xInsideISR != pdFALSE ) {
xSemaphoreGiveFromISR( *pxMutex, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE)
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
else
xSemaphoreGive( *pxMutex );
@ -946,7 +946,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
{
xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken );
if (xHigherPriorityTaskWoken == pdTRUE) {
taskYIELD_FROM_ISR();
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
else