Jump to content

KernAllocMutexLock: Difference between revisions

From EDM2
Created page with "==Synopsis== APIRET APIENTRY KernAllocMutexLock(KEEMutexLock* ml); ==Description== Initialize a mutexlock. This is basically the semaphore equivalent of a spinlock. Likewise,..."
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
Initialize a mutexlock. This is basically the semaphore equivalent of a spinlock. Likewise, it is usable to protect critical regions. The difference to a spinlock is that waiting on a mutex will send the thread that processor is executing to sleep. This makes sense - in contrast to a spinlock - for longer critical regions.
==Synopsis==
==Synopsis==
APIRET APIENTRY KernAllocMutexLock(KEEMutexLock* ml);
APIRET APIENTRY KernAllocMutexLock(KEEMutexLock* ml);
 
==Description==
Initialize a mutexlock. This is basically the semaphore equivalent of a spinlock. Likewise, it is usable to protect critical regions. The difference to a spinlock is that waiting on a mutex will send the thread that processor is executing to sleep. This makes sense - in contrast to a spinlock - for longer critical regions.


==Parameters==
==Parameters==
'''ml''': Pointer to a mutexlock structure in 32 bit memory.  
;''ml'' (KEEMutexLock*) - input : Pointer to a mutexlock structure in 32 bit memory.


[[Category:The OS/2 API Project]]
[[Category:KEE]]

Latest revision as of 03:07, 28 May 2025

Initialize a mutexlock. This is basically the semaphore equivalent of a spinlock. Likewise, it is usable to protect critical regions. The difference to a spinlock is that waiting on a mutex will send the thread that processor is executing to sleep. This makes sense - in contrast to a spinlock - for longer critical regions.

Synopsis

APIRET APIENTRY KernAllocMutexLock(KEEMutexLock* ml);

Parameters

ml (KEEMutexLock*) - input
Pointer to a mutexlock structure in 32 bit memory.