initnsema_mutex(D3X)
initnsema_mutex - initialize a mutex semaphore to one
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME initnsema_mutex - initialize a mutex semaphore to one SYNOPSIS #include "sys/types.h" #include "sys/sema.h" initnsema_mutex(sema_t *semap, char *name); DESCRIPTION initnsema_mutex initializes an IRIX mutual exclusion (mutex) semaphore (a structure of type sema_t). Use mutex semaphores to synchronize access to critical sections. You must allocate a semaphore before you can use it in a semaphore operation, such as psema or vsema. You can declare semaphores in line by using the sema_t type, or you can allocate them dynamically by using the kernel memory allocator, kern_malloc(D3X). In the case of an already allocated semaphore struct, initsema_mutex fills it. The name parameter of initnsema expects a pointer to an eight character string that contains the name you want to assign to the semaphore. This name may be used by debugging utilities. Return Values None See Also initnsema(D3X), cpsema(D3X), cvsema(D3X), psema(D3X), vsema(D3X), sleep(D3), vpsema(D3X), SLEEP_ALLOC(D3), SLEEP_DEALLOC(D3)