msem_unlock man page on OSF1

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
OSF1 logo
[printable version]

msem_unlock(3)							msem_unlock(3)

NAME
       msem_unlock - Unlock a semaphore

SYNOPSIS
       #include <sys/mman.h>

       int msem_unlock(
	       msemaphore *sem,
	       int condition );

LIBRARY
       Standard C Library (libc)

PARAMETERS
       Points  to  an msemaphore structure which specifies the semaphore to be
       unlocked.  Determines whether the msem_unlock()	function  unlocks  the
       semaphore if no other processes are waiting to lock it.

DESCRIPTION
       The msem_unlock() function unlocks a binary semaphore.

       If  the	condition  parameter  is  0 (zero), the semaphore is unlocked,
       whether or not any other processes are currently attempting to lock it.
       If  the	condition parameter is MSEM_IF_WAITERS, and another process is
       waiting to lock the semaphore  or  it  cannot  be  reliably  determined
       whether some process is waiting to lock the semaphore, the semaphore is
       unlocked	 by  the  calling  process.  If	 the  condition	 parameter  is
       MSEM_IF_WAITERS,	 and  no process is waiting to lock the semaphore, the
       semaphore will not be unlocked and an error will be returned.

       All calls to the msem_lock() and msem_unlock()  functions  by  multiple
       processes  sharing a common msemaphore structure behave as if the calls
       were serialized.

       If the msemaphore structure contains any value  not  resulting  from  a
       call  to	 the  msem_init()  function  followed  by  a  (possibly empty)
       sequence of calls to the msem_lock() and msem_unlock()  functions,  the
       results	are  undefined.	 The address of an msemaphore structure may be
       significant.  If the msemaphore structure  contains  any	 value	copied
       from  an	 msemaphore  structure	at  a different address, the result is
       undefined.

NOTES
       Trial use

RETURN VALUES
       On successful completion, the msem_unlock() function returns 0  (zero).
       On error, the msem_unlock() function returns -1 and sets errno to indi‐
       cate the error.

ERRORS
       If the msem_unlock() function fails, errno may be set  to  one  of  the
       following values: MSEM_IF_WAITERS was specified and there were no wait‐
       ers.  The sem parameter points to an msemaphore structure which	speci‐
       fies  a semaphore which has been removed, or the condition parameter is
       invalid.

SEE ALSO
       Functions: msem_init(3), msem_lock(3), msem_remove(3)

								msem_unlock(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net