Query: sem_destroy
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
sem_destroy(2) System Calls Manual sem_destroy(2)NAMEsem_destroy - destroy an unnamed POSIX semaphoreSYNOPSISDESCRIPTIONis used to destroy an unnamed semaphore. A successful call to will invalidate the unnamed semaphore referred to by sem and removes all descriptors referencing it. The semaphore should have been created by a previous call to and there should not be any processes blocked on it. To use this function, link in the realtime library by specifying on the compiler or linker command line.EXAMPLESThe following call to will destroy an unnamed semaphore referred to by sem and remove all descriptors referencing it.RETURN VALUEIf the semaphore was destroyed and the descriptors referencing it were removed, returns 0 to the caller. If the semaphore could not be destroyed, the call returns -1 and sets to indicate the error.ERRORSfails and does not perform the requested operation if any of the following conditions are encountered: [EBUSY] There are threads currently blocked on the semaphore or there are outstanding locks held on the semaphore. [EINVAL] The argument sem is not a valid unnamed semaphore.SEE ALSOsem_init(2), sem_open(2), <semaphore.h>.STANDARDS CONFORMANCEsem_destroy(2)
Related Man Pages |
---|
sem_destroy(3rt) - sunos |
sem_destroy(3) - freebsd |
sem_destroy(3) - mojave |
sem_destroy(3) - osx |
sem_destroy(3) - ultrix |
Similar Topics in the Unix Linux Community |
---|
semaphore |
file descriptors |
semaphore limits |
Symbol referencing error |
semaphore memory |