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

  man pages->Tru64 Unix man pages -> lock_init (9r)              
Title
Content
Arch
Section
 

lock_init(9r)

Contents


NAME    [Toc]    [Back]

       lock_init - General: Initializes a complex lock

SYNOPSIS    [Toc]    [Back]

       #include <kern/lock.h>

       void lock_init(
               lock_t lock_structptr,
               boolean_t can_sleep );

ARGUMENTS    [Toc]    [Back]

       Specifies  a  pointer to the complex lock structure, lock.
       The lock structure is an opaque data structure;  that  is,
       its  associated  members are referenced and manipulated by
       the operating system and not by the user  of  the  complex
       lock  mechanism.  Specifies a Boolean value that indicates
       whether to allow kernel threads to block  (sleep)  if  the
       complex  lock  is  asserted. You can pass to this argument
       only the value TRUE (allow kernel threads to block if  the
       lock is asserted).

DESCRIPTION    [Toc]    [Back]

       The  lock_init  routine  initializes  a complex lock.  You
       identify this lock by declaring a  pointer  to  a  complex
       lock  structure  and passing it as the first argument. The
       complex lock structure pointer must be initialized  before
       you  can  assert  read and write operations on the complex
       lock.

RETURN VALUES    [Toc]    [Back]

       None

FILES    [Toc]    [Back]

SEE ALSO
       Routines:   lock_done(9r),   lock_read(9r),    lock_terminate(9r),      lock_try_read(9r),      lock_try_write(9r),
       lock_write(9r)

       Data Structures: lock(9s)



                                                    lock_init(9r)
[ Back ]
 Similar pages
Name OS Title
simple_lock_init Tru64 General: Initializes a simple lock structure
lock_try_read Tru64 General: Tries to assert a complex lock
lock_terminate Tru64 General: Terminates, using a complex lock
lock_done Tru64 General: Releases a complex lock
lock Tru64 General: Contains complex lock-specific information
lock_try_write Tru64 General: Tries to assert a complex lock with write access
lock_read Tru64 General: Asserts a complex lock with read-only access
usinitlock IRIX initializes a lock
tis_rwlock_init Tru64 Initializes a read-write lock object
pthread_rwlock_init Tru64 Initializes a read-write lock object
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service