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.

Thread sync in RTOS



Hi everybody,

When do we need a thread for sync like below?

//Create Thread for Sync.
    OSI_RET_OK_CHECK(sl_SyncObjCreate(&SendThreadSync, "SendSync"));
    sl_SyncObjClear(&SendThreadSync);

Thanks in advanced!

  • Hi,

    These are APIs required for synchronization.

    You would need these objects to be created and used when you are waiting for an operation to be completed.
    You can proceed further only after a sequence in your code signals this object to stop waiting.

    API like
    - 'sl_SyncObjWait' is used to wait for an operation on an object.
    - 'sl_SyncObjSignal' is used to signal the object to stop waiting.

    Regards,
    Raghavendra