Home |
RTKernel-32 Programming Manual Multitasking, Real-Time, and RTKernel-32 Alternate APIs for RTKernel-32 RTKernel-C 4.5 for DOS Compatible API Win32 and RTKernel-32 Error Handling Mixing RTKernel-32 and Win32 APIs Function InitializeCriticalSection Function InitializeCriticalSectionAndSpinCount Function TryEnterCriticalSection Function DeleteCriticalSection Function WaitForMultipleObjects Function QueryPerformanceCounter Function QueryPerformanceFrequency Function GetSystemTimeAdjustment Function SetThreadAffinityMask Function SetThreadGroupAffinity |
Mixing RTKernel-32 and Win32 APIsThe simultaneous use of both RTKernel-32's native and Win32 API is possible and quite typical, since the Win32 thread API lacks many features required by real-time systems (e.g., interrupt handling, real-time memory management, etc.). However, care must be taken not to confuse Win32 thread handles and RTKernel-32 task handles. Every task running under RTKernel-32 has exactly one RTKernel-32 task handle. However, only those tasks started by Win32's CreateThread function have one or more Win32 handles. If you want to use the compiler's multithread run-time libraries, all threads using the run-time systems should be started using the run-time systems' function for this purpose (e.g., _beginthread) or function RTKRTLCreateThread. To translate Win32 thread handles to/from RTKernel-32 handles, use function RTKWin32ToRTKHandle and function RTKToWin32Handle. Win32 and RTKernel-32 Error Handling
|