This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc3200 SDK 使用的rtos中, osi_TaskDelete函数是不是有bug?



写了一个任务,发现调试经常有问题。 

void communication_task( void *pvParameters )
{
int iNewSockID = (int)pvParameters;
int lLoopCount = 0;
int iStatus = 0;
int iTestBufLen = 128;
char g_cBsdBuf[128];

Report("sock id -- %d\r\n", iNewSockID);
while(1) {

osi_Sleep(100); //100ms
iStatus = sprintf(g_cBsdBuf, "x-%d, y-%d, z-%d\r\n", pcAccX, pcAccY, pcAccZ);
iStatus = sl_Send(iNewSockID, g_cBsdBuf, iStatus, 0 );
if( iStatus <= 0 ) {
// error
//ASSERT_ON_ERROR(TCP_SERVER_FAILED);
ERR_PRINT(TCP_SERVER_FAILED);
break;
}
}
// close the connected socket after receiving from connected TCP client
sl_Close(iNewSockID);

osi_TaskDelete(NULL);
}

函数最后调用osi_TaskDelete函数后,经常会出现进入

void
vAssertCalled( const char *pcFile, unsigned long ulLine )
{
//Handle Assert here
while(1)
{
}
}

函数的情况。

有时则是会进入 xTaskWaitingTermination函数, 然后系统就挂起在这里了。

感觉很奇怪啊。