Home |
RTKernel-32 Programming Manual Function RTKRTLCreateThread |
Function RTKRTLCreateThreadFunction RTKRTLCreateThread creates a thread with multithread run-time system library support: typedef void (__cdecl * RTKThreadFunction)(void * Parameter); RTKTaskHandle RTKRTLCreateThread(RTKThreadFunction TaskCode, unsigned Priority, unsigned StackSize, unsigned long Flags, void * Parameter, const char * Name); This function has the same parameters as function RTKCreateThread. The only difference is that the program's C/C++ or Pascal run-time system is made aware of the new thread. This is required to avoid reentrance problems when several threads call non-reentrant run-time system functions. RTKRTLCreateThread requires the compiler's multithread run-time system libraries to be linked. Threads created with RTKRTLCreateThread should not be terminated with RTKTerminateTask, because resources allocated by the run-time system for the thread would not be deallocated. Instead, such threads should return from their thread function or they should call whatever terminating function is made available by the tun-time system.
|