SV_ALLOC man page on IRIX

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



SV_ALLOC(D3)							  SV_ALLOC(D3)

NAME
     SV_ALLOC, SV_INIT - synchronization variable initialization

SYNOPSIS
     #include <sys/types.h>
     #include <sys/kmem.h>
     #include <sys/ksynch.h>
     #include <sys/ddi.h>
     #include <sys/sema.h>
     sv_t *SV_ALLOC(int type, int flag, char *name);

     void SV_INIT(sv_t *svp, int type, char *name);

   Arguments
     svp       Pointer to uninitialized synchronization variable.

     type      Specifies the order in which threads of execution that are
	       waiting on the synchronization variable are dequeued when
	       SV_SIGNAL or SV_BROADCAST are called.

     flag      Specifies whether the caller is willing to sleep waiting for
	       memory.

     name      Ascii string associated with the synchronization object.

DESCRIPTION
     SV_ALLOC dynamically allocates and initializes an instance of a
     synchronization variable.	SV_INIT initializes an instance of a
     synchronization variable.

     If type is set to either SV_DEFAULT or SV_FIFO, waiting threads of
     execution are wakened in first-in, first-out order; if the type is
     SV_LIFO, they are dequeued in first-in, last-out order.  If the
     synchronization variable is of type SV_PRIO, waiters will be processed in
     priority order.

     If flag is set to KM_SLEEP, the caller of SV_ALLOC will sleep if
     necessary until sufficient memory is available.  If flag is set to
     KM_NOSLEEP, the caller will not sleep, but SV_ALLOC will return NULL if
     sufficient memory is not immediately available.

     The name argument is only used if the metering sleep-locks package is
     installed.	 A null name is ignored.

   Return Values
     Upon successful completion, SV_ALLOC returns a pointer to the newly
     allocated lock.  If KM_NOSLEEP is specified and sufficient memory is not
     immediately available, SV_ALLOC returns a NULL pointer.

									Page 1

SV_ALLOC(D3)							  SV_ALLOC(D3)

USAGE
   Level
     Base or Initialization.

   Synchronization Constraints
     SV_ALLOC may sleep if flag is set to KM_SLEEP.

     Driver-defined basic locks and read/write locks may be held across calls
     to this function if flag is KM_NOSLEEP but may not be held if flag is
     KM_SLEEP.

     Driver-defined sleep locks may be held across calls to this function
     regardless of the value of flag.

REFERENCES
     SV_DEALLOC(D3), SV_DESTROY(D3), SV_WAIT(D3), SV_WAIT_SIG(D3),
     SV_SIGNAL(D3), SV_BROADCAST(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