Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Create_Semaphore
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     ecx, TokenCount     ; initial token count
VMMcall Create_Semaphore
 
jc      error               ; carry set if semaphore not created
mov     [Semaphore], eax    ; semaphore handle
 
The Create_Semaphore service allocates memory for and initializes a new
semaphore.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
TokenCount  Specifies the initial count of tokens.
 
Return Value
 
The carry flag is clear and the EAX register contains the semaphore handle
if the function is successful. Otherwise, the carry flag is set to indicate
an error.
 
Uses
 
EAX, Flags
 
See Also
 
Destroy_Semaphore, Signal_Semaphore, Wait_Semaphore