KosThreadCallback()

August 2, 2023

ID kos_thread_callback

The callback function prototype is declared in the kos/thread.h file.

typedef void KosThreadCallback(KosThreadCallbackReason reason);

/* Callback function argument */

typedef enum KosThreadCallbackReason {

KosThreadCallbackReasonCreate,

KosThreadCallbackReasonDestroy,

} KosThreadCallbackReason;

When a new thread is created, all registered callback functions will be called with the KosThreadCallbackReasonCreate argument. When the thread is terminated, they will be called with the KosThreadCallbackReasonDestroy argument.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.