include vmm.inc mov ecx, TokenCount ; initial token count VMMcall Create_Semaphore jc error ; carry flag set if semaphore not created mov [Semaphore], eax ; semaphore handle |
The Create_Semaphore service allocates memory for and initializes a new semaphore.
TokenCount
Specifies the initial count of tokens.
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.
EAX, Flags