lock_try_read man page on DigitalUNIX

Printed from http://www.polarhome.com/service/man/?qf=lock_try_read&af=0&tf=2&of=DigitalUNIX

lock_try_read(9r)					     lock_try_read(9r)

NAME
       lock_try_read  - General: Tries to assert a complex lock with read-only
       access

SYNOPSIS
       #include <kern/lock.h>

       boolean_t lock_try_read(
	       lock_t lock_structptr );

ARGUMENTS
       Specifies a pointer to the complex lock structure, lock.	 This  is  the
       lock structure associated with the resource on which you want to try 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 com‐
       plex lock mechanism.

DESCRIPTION
       The  lock_try_read  routine  tries  to  assert  a complex lock (without
       blocking) with read-only access for the resource	 associated  with  the
       specified  lock structure pointer. To release a complex lock with read-
       only access successfully asserted by lock_try_read, call the  lock_done
       routine.

NOTES
       You  must  call lock_init (once only) prior to calling lock_try_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
       The  lock_try_read  routine  returns  one  of the following values: The
       attempt to acquire the read-only	 complex  lock	was  successful.   The
       attempt to acquire the read-only complex lock was unsuccessful.

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

       Data Structures: lock(9s)

							     lock_try_read(9r)
[top]

List of man pages available for DigitalUNIX

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