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

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

simple_lock_try(9r)

Contents


NAME    [Toc]    [Back]

       simple_lock_try - General: Tries to assert a simple lock

SYNOPSIS    [Toc]    [Back]

       #include <kern/lock.h>

       boolean_t simple_lock_try(
               simple_lock_t slock_ptr );

ARGUMENTS    [Toc]    [Back]

       Specifies  a  pointer  to a simple lock structure. You can
       declare this simple lock structure by using the  decl_simple_lock_data
 routine.

DESCRIPTION    [Toc]    [Back]

       The  simple_lock_try  routine  tries to assert a lock with
       read and write access for the resource associated with the
       specified  simple  lock.  The main difference between this
       routine and simple_lock is  that  simple_lock_try  returns
       immediately  if the resource is already locked, while simple_lock
 spins until the lock  has  been  obtained.  Thus,
       call  simple_lock_try  when you need a simple lock but the
       code cannot spin until the lock is obtained.

       To release a simple lock  successfully  asserted  by  simple_lock_try,
 call the simple_unlock routine.

RETURN VALUES    [Toc]    [Back]

       The  simple_lock_try  routine returns one of the following
       values: The simple_lock_try routine successfully  asserted
       the  simple  lock.   The simple_lock_try routine failed to
       assert the simple lock.

FILES    [Toc]    [Back]

SEE ALSO
       Routines: decl_simple_lock_data(9r), simple_lock(9r), simple_lock_init(9r),     simple_lock_terminate(9r),     simple_unlock(9r)

       Data Structures: slock(9s)



                                              simple_lock_try(9r)
[ Back ]
 Similar pages
Name OS Title
lock_try_read Tru64 General: Tries to assert a complex lock
lock_try_write Tru64 General: Tries to assert a complex lock with write access
simple_lock Tru64 General: Asserts a simple lock
simple_unlock Tru64 General: Releases a simple lock
simple_lock_terminate Tru64 General: Terminates, using a simple lock
simple_lock_init Tru64 General: Initializes a simple lock structure
decl_simple_lock_data Tru64 General: Declares a simple lock structure
slock Tru64 General: Contains simple lock-specific information
lock_terminate Tru64 General: Terminates, using a complex lock
lock_init Tru64 General: Initializes a complex lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service