*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> usnewlock (3p)              
Title
Content
Arch
Section
 

Contents


USNEWLOCK(3P)							 USNEWLOCK(3P)


NAME    [Toc]    [Back]

     usnewlock - allocate and initialize a lock

C SYNOPSIS    [Toc]    [Back]

     #include <ulocks.h>

     ulock_t usnewlock (usptr_t	*handle);

DESCRIPTION    [Toc]    [Back]

     usnewlock allocates a lock	from the arena designated by handle (returned
     from usinit(3P)) and initializes it and all associated data.  There are
     different types of	locks; by default the fastest lock type	for the	class
     of	machine	the process is running on is allocated.	 See usconfig(3P) for
     other specifiable lock types.  Metering and debugging are only enabled if
     the locks are of the debugging type (see usconfig(3P).  There is a	limit
     of	a maximum of 4096 locks	per shared area	(for hardware supported
     locks).  The size of the shared arena can also limit the number of	locks
     that can be allocated.

     usnewlock will fail if one	or more	of the following are true:

     [ENOMEM]	    There is no	memory in the arena available to allocate the
		    lock structure (see	usconfig(3P)).

     [ENOSPC]	    If the system imposed maximum (4096) number	of allocatable
		    locks has been exceeded.

     [ENOSPC]	    All	the locks in the system	have been allocated.

SEE ALSO    [Toc]    [Back]

      
      
     usconfig(3P), usctllock(3P), usfreelock(3P), usinit(3P), usinitlock(3P),
     usnewsema(3P), usnewpollsema(3P), ussetlock(3P).

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a ulock_t structure is	returned, otherwise
     NULL is returned and errno	is set to indicate the error.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
usnewsema IRIX allocate and initialize a semaphore
usnewpollsema IRIX allocate and initialize a pollable semaphore
TP_CertCreateTemplate Tru64 Allocate and initialize template memory (CDSA)
acl_init Tru64 Allocate and initialize ACL internal working storage
CSSM_TP_CertCreateTemplate Tru64 Allocate and initialize template memory (CDSA)
CL_CertCreateTemplate Tru64 Allocate and initialize memory for a certificate template (CDSA)
CSSM_CL_CertCreateTemplate Tru64 Allocate and initialize memory for a certificate template (CDSA)
pthread_rwlockattr_init FreeBSD initialize a read/write lock
pthread_rwlock_init OpenBSD initialize a read/write lock
pthread_rwlockattr_init OpenBSD initialize a read/write lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service