ThreadX supports Mutex or Semaphore for threads to signal each other. It is a common way used in RTOS.
You can check demo project RtosExample in FX3SDK for the usage of Semaphore and Mutex.
Thanks for your reply.
I have checked the rtos example in sdk, but I still do not know how to stop(finish) a thread.
I do not want to do some multi thread operation, I just want to stop an idle thread.
I have found a function called CyU3PThreadDestroy, but do not know how to use it.
In this thread, you can call CyU3PThreadSuspend to suspend itself. However, you cannot call CyU3PThreadDestroy to destroy itself.
I have tried CyU3PThreadSuspend to suspend the thread itself today, but the firmware seems freeze.
If I have just leave the thread run loop freely, everything seems go well again.