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: simplelink driver concurrency issue

Part Number: CC3200


Hi,

I've noticed a concurrency problem with g_pCB->FlowContCB.TxPoolCnt (simplelink/source/driver.c):

in case there are 2 tasks that transmit/receive data over 2 simultaneously opened sockets, 

g_pCB->FlowContCB.TxPoolCnt = ((_SlResponseHeader_t *)uBuf.TempBuf)->TxPoolCnt; (_SlDrvMsgRead)

may get called in the context of one task while another one is in between 

if(g_pCB->FlowContCB.TxPoolCnt > FLOW_CONT_MIN + 1 )

and

VERIFY_PROTOCOL(g_pCB->FlowContCB.TxPoolCnt > FLOW_CONT_MIN + 1 );

g_pCB->FlowContCB.TxPoolCnt--;

(_SlDrvDataWriteOp)


Please find the fixed code attached (based on the 1.2.0 SDK):

driver.h


driver.c

The solution above fixed the issue for my use case (one task does only TX, another one does mostly RX). Please consider it to be included in the upstream SDK.