This function is declared in the kos/thread.h file.
typedef int KosThreadOnceState;
Retcode KosThreadOnce(KosThreadOnceState *onceControl,
void (* initRoutine) (void));
This function lets you call the defined initRoutine procedure precisely one time, even when it is called from multiple threads.
The onceControl parameter is designed to control the one-time call of the procedure.
If the procedure is successfully called, and if it was called previously, the KosThreadOnce() function returns rcOk.