Our team is moving code from t-kernel to legato and has two threading problems:
le_thread_Join in legato can release the resources of sub-threads in the main thread, but I hope that self-termination(use le_thread_Cancel) and deletion(Delete thread and release the space occupied by threads) can be done in sub-threads. What should I do in legato Application?
There are two sets of functions in t-kernel: tk_slp_tsk() and tk_wup_tsk (tskid).They can self-suspends threads and other threads wake-up threads at specified locations, because there is no similar interface in legato. I use mutex and cond in Linux to complete this pair of interfaces.(Does using these Linux functions in legato threads cause problems?)
The other pair of interface is tk_sus_tsk (tskid) and tk_rsm_tsk (tskid), which can suspend and wake up the specified thread by passing in ID(In any thread). This seems not only impossible in legato, but also troublesome in linux. I hope to provide some ideas.