Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ _barrier_spin(3synch) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

_barrier_spin_destroy(3synch)

_barrier_spin_init(3synch)

barrier(3synch)

barrier_destroy(3synch)

barrier_init(3synch)

barrier_wait(3synch)

synch(3synch)






       _barrier_spin(3synch)                          _barrier_spin(3synch)


       NAME
             _barrier_spin - spin-wait at a barrier

       SYNOPSIS
             cc [options] -Kthread file
             #include <synch.h>
             int _barrier_spin(barrier_spin_t *barrier);

          Parameters
             barrier  pointer to the barrier object at which to spin

       DESCRIPTION
             _barrier_spin makes the calling thread busy-wait, or spin, at
             a spinning barrier until count threads reach the barrier.
             count is defined during initialization with
             _barrier_spin_init.  A thread is said to have reached the
             barrier when it calls _barrier_spin.

             When the last thread reaches the barrier, all count spinning
             threads are released from the barrier and allowed to resume
             execution.  The barrier is reset after the waiting threads are
             released.

             barrier must previously have been initialized (see
             barrier_spin_init).

          Return Values
             _barrier_spin returns zero for success and an error number for
             failure, as described below.

          Errors
             If one of the following conditions is detected, _barrier_spin
             returns the corresponding value:

             EINVAL   Invalid argument specified.

       USAGE
             Because spinning barriers waste resources, most applications
             should use blocking barriers instead of spinning barriers.
             Spinning barriers should only be used when all participating
             threads will reach the barrier at approximately the same time.

          Warnings
             Spinning barriers should never be used on a uniprocessor.




                           Copyright 1994 Novell, Inc.               Page 1













      _barrier_spin(3synch)                          _barrier_spin(3synch)


      REFERENCES
            _barrier_spin_destroy(3synch), _barrier_spin_init(3synch),
            barrier(3synch), barrier_destroy(3synch),
            barrier_init(3synch), barrier_wait(3synch), synch(3synch)












































                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026