◄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 ♦