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.

RTOS/CC3200: Is Seconds_get() thread-safe?

Part Number: CC3200
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi,

I have multiple Tasks that use the system time for various things.  They all call Seconds_get() and only one Task calls Seconds_set() to sync it periodically with NTP time.

Is this safe to do?  Or should I protect the Seconds_get() and Seconds_set() with a semaphore?

I am using TI-RTOS for Simplelink on the CC3200.

  • Hi,

    Yes for the CC3200, Seconds_get/set are thread-safe. They disable interrupts for a very small window to update internal data structures. You can look at the implementation in the bios_<version>\packages\ti\sysbios\family\arm\cc32xx\Seconds.c file

    Todd