Closed alobop closed 1 year ago
Yeah, you're right, there's no good way to pass custom context.
One possibility is to use the extension members of the structs to store custom context, e.g. you can define the TX_QUEUE_EXTENSION member of the queue struct: https://github.com/azure-rtos/threadx/blob/master/common/inc/tx_api.h#L939
Closing. Anyone feel free to re-open if there are further questions related to this.
I’m working with threadx and I wanted to use the event chaining for one of my applications. I noticed that it is not possible to pass down a private context for the callback (unlike other functions that allow arbitrary user context such as the thread_create, timer_create). Since this is not possible, it forces the callee to have a static context for modules that use the event chaining feature.
vs