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.

TI-15.4-STACK-GATEWAY-LINUX-SDK: Collector threading resource release question.

Part Number: TI-15.4-STACK-GATEWAY-LINUX-SDK

Environments: (1) MIPS Gateway run collector with TI-15-4-STACK-GATEWAY-LINUX-SDK_4.20.00.05 + CC1310 as CoP run with CC13X0-SDK_4_10_00_10. (2) LaunchPad CC1310 (CC13X0-SDK_4_10_00_10) or LaunchPad CC1312 (CC13X0-CC26X0-SDK_4_30_00_54)

Test cases: Client open socket and close socket intensively for OAD tasks in batch mode.

Results: (1) The collector will quit after some OAD tasks. (2) I found pthread_create return value 11.

Questions: I checked origin code in linux_specific.c file and found it pass NULL to the second argument of pthread_create API. Any reason to pass NULL? (2) I pass pthread_attr_t with PTHREAD_CREATE_DETACHED to the second argument and re-test above test cases become fine. Any impact for collector 15.4 state machine if I set all threads as detachable? 

Peter.

  • Hi Peter, 

    Are you using the default examples from the SDK or have you made any modifications?

    Thanks,
    Elin

  • Hi Elin,

    As default example made for x86 and our target platform is mips architecture, I did some patches from default example.

    Most of patches are fixed for endianness issue only.

    Last & biggest patch is implementing pthread_timedwait API due to missing this API on our target platform.

    Peter. 

  • Hi Peter, 

    Thanks for sharing. 

    Can you provide some sniffer logs so we can see the communication over the air?

    Is the error consistent? Aka does the error occur at the same OAD task every time?

    Thanks, 
    Elin

  • Hi Elin,

    You seems misunderstand my questions.

    1. I believe the pthread_create API usage in example linux_specific.c file is not correct although no problem running on PC Ubuntu.

    It does not release resource from API spec! This does not related to air communication.

    2 I want to make sure any side-effect (like impact collector state machine?) if I fixed it by passing pthread_attr_t with PTHREAD_CREATE_DETACHED to pthread_create API.

    Peter,

  • Hi Peter,

    Circling back to your original question in this thread, passing NULL means that you are using the default settings which what we use for testing. I don't think that making the thread detachable will have will have any impact on the collector, as the threads are probably independent on other threads finishing/exiting to read their return status, but I cannot guarantee that you wont have any problems. 

    Thanks, 
    Elin