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

  man pages->IRIX man pages -> barrier (3p)              
Title
Content
Arch
Section
 

Contents


BARRIER(3P)							   BARRIER(3P)


NAME    [Toc]    [Back]

     barrier, new_barrier, init_barrier, free_barrier -	barrier	functions

C SYNOPSIS    [Toc]    [Back]

     #include <ulocks.h>

     barrier_t *new_barrier (usptr_t *handle);

     void free_barrier (barrier_t *b);

     void init_barrier (barrier_t *b);

     void barrier (barrier_t *b, unsigned n);

DESCRIPTION    [Toc]    [Back]

     These routines provide a simple rendezvous	mechanism for shared address
     processes.

     new_barrier takes a usptr_t as an argument	to indicate the	shared arena
     from which	to allocate the	barrier.  The usptr_t is a previously
     allocated handle obtained through a call to usinit(3P).

     The barrier function takes	a pointer to a previously allocated and
     initialized barrier structure (as returned	by new_barrier)	and the	number
     of	processes/sub-tasks to wait for.  As each process enters the barrier,
     it	spins (busy wait) until	all n processes	enter the barrier.  At that
     time all are released and continue	executing.

     free_barrier releases all storage associated with b.

     init_barrier resets the barrier to	its default state.

     new_barrier will fail if one or more of the following are true:

     [ENOMEM]	    There is not enough	space to allocate a barrier structure.

     [ENOMEM]	    It is not possible to allocate a lock.

SEE ALSO    [Toc]    [Back]

      
      
     sproc(2), usinit(3P), ussetlock(3P), usunsetlock(3P), usnewlock(3P).

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, new_barrier returns a pointer to a barrier
     struct.  Otherwise, a value of 0 is returned to the calling process.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
mb Tru64 General: Performs a memory barrier
BIO_puts Tru64 BIO I/O functions
BIO_read Tru64 BIO I/O functions
krb5_us_timeofday FreeBSD whatever these functions do
BIO_read NetBSD BIO I/O functions
BIO_gets Tru64 BIO I/O functions
BIO_write Tru64 BIO I/O functions
krb5_timeofday FreeBSD whatever these functions do
MD5_Final OpenBSD MD2, MD4, and MD5 hash functions
MD4_Update OpenBSD MD2, MD4, and MD5 hash functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service