[Toc][Index]

DosSemSet


Bindings:  C, MASM 

This call unconditionally sets a semaphore; that is, it sets the semaphore 
whether or not it is already set. 
 DosSemSet    (SemHandle) 
 
 SemHandle (HSEM) - input 
    Reference to the semaphore. 
    For a system semaphore, this reference is the handle returned by a 
    DosCreateSem or DosOpenSem request that granted the requesting thread 
    access to the semaphore. 
    For a RAM semaphore, this reference is the address of a doubleword of 
    storage, allocated and initialized to zero by the application. This 
    sets the semaphore as unowned. Other than initializing the doubleword 
    to zero, an application must not modify a RAM semaphore directly; 
    instead it manipulates the semaphore with semaphore function calls. 
 rc (USHORT) - return 
    Return code descriptions are: 
    0         NO_ERROR 
    100       ERROR_TOO_MANY_SEMAPHORES 
    103       ERROR_TOO_MANY_SEM_REQUESTS 
 
 Remarks 
 DosSemSet usually is not required in a resource control environment using 
 DosSemRequest and DosSemClear.  It typically is used in a signaling 
 environment implemented with DosSemWait,  DosMuxSemWait, and DosSemClear. 
 These function calls are used to block one or more threads on a set 
 semaphore and awaken them when an event occurs. 
 DosSemSet cannot be issued against a system semaphore that is owned by 
 another thread, unless the NoExclusive option was set in the original 
 DosCreateSem request. 
 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs