I am spawning a thread using below function in FreeRTOS v9.0.0
result = xTaskCreate( (TaskFunction_t)entry_function, name, (unsigned short)(stack_size / sizeof( portSTACK_TYPE )), (void*)arg, (unsigned portBASE_TYPE) priority, thread );
return ( result == (signed portBASE_TYPE) pdPASS ) ? WWD_SUCCESS : WWD_THREAD_CREATE_FAILED;
This Task is created. In this task I run an Iperf Server thread which receive packets from a remote endpoint with data rate of 60Mbps. After about 400 seconds, the Iperf Thread quits and in the calling thread
is called before exiting the function. this functions calls to remove the pxTCB from the list and here it hangs..
(UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
/* The list item knows which list it is in. Obtain the list from the list
Listt * const pxList = ( Listt * ) pxItemToRemove->pvContainer;
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
Is this know problem with FreeRTOS the vTaskDelete(NULL) to remove resources fo r current thread causes an system hang..
This this was answered here: https://sourceforge.net/p/freertos/discussion/382005/thread/998b8fc0/
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.