sem_destroy(3C)						       sem_destroy(3C)
      sem_destroy - deinitialize	a posix	unnamed	semaphore
      #include <semaphore.h>
     int sem_destroy(sem_t *sem<b>);
     sem_destroy deinitializes the unnamed semaphore located at	address	sem.
     The address sem may reside	anywhere in the	calling	processes address
     space, but	the process must have read and write access to sem.
     Once an unnamed semaphore has been	deinitialized, semaphore operations
     performed on it will fail until the semaphore has been reinitialized.
     sem_destroy will fail if one or more of the following are true:
     [EINVAL]	 The semaphore located at address sem is not a valid posix
		 unnamed semaphore.
     [EBUSY]	 The system has	detected processes currently blocked on	the
		 semaphore. This condition may not be detected if a sem_post
		 operation is executed at the same time	as the sem_destroy
		 operation.
     sem_init(3C), sem_getvalue(3C), sem_post(3C), sem_wait(3C),
     sem_trywait(3C), sem_open(3C), sem_close(3C), sem_unlink(3C),
     shm_open(3C), mmap(3C)
     Upon successful completion, a value of 0 is returned to the calling
     process. Otherwise, a value of -1 is returned and errno is	set to
     indicate the error.
									PPPPaaaaggggeeee 1111 [ Back ]
 |