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

  man pages->Tru64 Unix man pages -> lock_read (9r)              



NAME    [Toc]    [Back]

       lock_read - General: Asserts a complex lock with read-only

SYNOPSIS    [Toc]    [Back]

       #include <kern/lock.h>

       void lock_read(
               lock_t lock_structptr );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to the complex lock  structure,  lock.
       This is the lock structure associated with the resource on
       which you want to assert a  complex  lock  with  read-only
       access.  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.

DESCRIPTION    [Toc]    [Back]

       The lock_read routine asserts a lock with read-only access
       for the resource associated with the specified lock structure
 pointer. The lock_read routine allows multiple kernel
       threads to access the resource read-only at the same time.
       When a read lock is asserted, the  protected  resource  is
       guaranteed not to change.

       To  release  a  previously  asserted  read  lock, call the
       lock_done routine.

NOTES    [Toc]    [Back]

       You must call  lock_init  (once  only)  prior  to  calling
       lock_read to initialize the lock structure pointer for the
       resource.  A resource, from  the  kernel  module's  standpoint,
 is data that more than one kernel thread can manipulate.
 You can store the resource in global variables  and
       in data structure members.

RETURN VALUES    [Toc]    [Back]


FILES    [Toc]    [Back]

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

       Data Structures: lock(9s)

[ Back ]
 Similar pages
Name OS Title
lock_write Tru64 Asserts a complex lock with write access
simple_lock Tru64 General: Asserts a simple lock
lock_try_write Tru64 General: Tries to assert a complex lock with write access
tis_read_trylock Tru64 Attempts to acquire a read-write lock for read access and does not wait if the lock cannot be immedi...
tis_read_unlock Tru64 Unlocks a read-write lock that was acquired for read access
pthread_rwlock_rdlock Tru64 Acquires a read-write lock for read access
tis_read_lock Tru64 Acquires a read-write lock for read access
lock_try_read Tru64 General: Tries to assert a complex lock
lock_done Tru64 General: Releases a complex lock
lock_terminate Tru64 General: Terminates, using a complex lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service