Query: msem_unlock
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
msem_unlock(2) System Calls Manual msem_unlock(2)NAMEmsem_unlock - unlock a semaphoreSYNOPSISDESCRIPTIONunlocks a binary semaphore. sem points to an structure that specifies the semaphore to be unlocked. If the condition argument is zero, the semaphore will be unlocked, whether or not any other processes are currently attempting to lock it. If the condition argument is and some other process is waiting to lock the semaphore or the implementation cannot reliably determine whether some process is waiting to lock the semaphore, the semaphore is unlocked by the calling process. If the condition argument is and no process is waiting to lock the semaphore, the semaphore is not unlocked and an error is returned. All calls to and by multiple processes sharing a common structure behave as if the calls were serialized. If the structure contains any value not resulting from a call to followed by a (possibly empty) sequence of calls to and the results are undefined. The address of an uniquely identifies the semaphore. If the structure contains any value copied from a structure at a differ- ent address, the result is undefined.IMPLEMENTATION NOTESThe system attempts to ignore or recover from invalid values placed in the structure, but this is not guaranteed for all cases.RETURN VALUEUpon success, returns zero; otherwise, it returns -1 and sets to indicate the error.ERRORSfails if any of the following conditions are encountered: [EAGAIN] was specified and there were no waiters. [EINVAL] sem points to an structure that has been removed, or condition is invalid. [EFAULT] sem is an invalid pointer.AUTHORwas developed by HP and OSF.SEE ALSOmsem_init(2), msem_lock(2), msem_remove(2), mman(5).STANDARDS CONFORMANCEmsem_unlock(2)
Related Man Pages |
---|
sem_post(3c) - opensolaris |
sem_trywait(2) - hpux |
msem_init(3) - osf1 |
msem_unlock(3) - osf1 |
sem_init(3) - osf1 |
Similar Topics in the Unix Linux Community |
---|
waiting process |
Can Mutex be replaced with anything? |
Semaphore |