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 EnterCriticalSection Function TryEnterCriticalSection Function DeleteCriticalSection Function WaitForMultipleObjects Function QueryPerformanceCounter Function QueryPerformanceFrequency Function GetSystemTimeAdjustment Function SetThreadAffinityMask Function SetThreadGroupAffinity |
Function EnterCriticalSectionEnterCriticalSection locks a Win32 critical section. If the calling thread must block, RTKWait is called on the RTKernel-32 semaphore associated with the given critical section. Unlike Windows, RTKernel-32 will implicitly initializes a critical section by calling InitializeCriticalSection if an uninitialized critical section is supplied as a parameter (that is, a structure with all fields set to zero). Thus, calling InitializeCriticalSection is never required. Merely heap-allocated critical sections should be be memset to zero before use. Auto-initializing critical sections is multithread and multiprocessor safe. Function InitializeCriticalSectionAndSpinCount Function TryEnterCriticalSection
|