TRYLOCK man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



TRYLOCK(D3)							   TRYLOCK(D3)

NAME
     TRYLOCK - try to acquire a basic lock

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ksynch.h>
     #include <sys/ddi.h>
     int TRYLOCK(lock_t *lockp, pl_t pl);

   Arguments
     lockp     Pointer to the basic lock to be acquired.

     pl	       The interrupt priority level to be set while the lock is held
	       by the caller.

DESCRIPTION
     If the lock specified by lockp is immediately available (can be acquired
     without waiting) TRYLOCK sets the interrupt priority level in accordance
     with the value specified by pl and acquires the lock.  If the lock is not
     immediately available, the function returns without acquiring the lock.

   Return Values
     If the lock is acquired, TRYLOCK returns the previous interrupt priority
     level for use by UNLOCK.  If the lock is not acquired the value invpl is
     returned.

USAGE
     Because some implementations require that interrupts that might attempt
     to acquire the lock be blocked on the processor on which the lock is
     held, portable drivers must specify a pl value that is sufficient to
     block out any interrupt handler that might attempt to acquire this lock.
     See the description of the min_pl argument to LOCK_ALLOC(D3) for
     additional discussion and a list of the valid values for pl.

     TRYLOCK may be used to acquire a lock in a different order from the order
     defined by the lock hierarchy.

     When called from interrupt level, the pl argument must not specify a
     priority level below the level at which the interrupt handler is running.

   Level
     Base or Interrupt.

   Synchronization Constraints
     Does not sleep.

     Driver-defined basic locks, read/write locks, and sleep locks may be held
     across calls to this function.

									Page 1

TRYLOCK(D3)							   TRYLOCK(D3)

REFERENCES
     LOCK(D3), LOCK_ALLOC(D3), LOCK_DEALLOC(D3), UNLOCK(D3)

									Page 2

[top]

List of man pages available for IRIX

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