open-mpi/ompi — pull request #300 by hjelmn (2014-12-02 20:49:01+00:00)
Title: Add opal_fifo_t class and rename opal_atomic_lifo_t to opal_lifo_t

This commit contains the following changes:

- Rename opal_atomic_lifo_t to opal_lifo_t to reflect both atomic and
non-atomic usage. Added new routines (opal_lifo_*_st) for non-atomic
usage as well as routines conditioned off opal_using_threads(). The
atomic versions are always thread safe and the non-atomic are always
not thread safe.

- Add a new atomic lifo implementation that makes use of 128-bit
compare-and-swap. The new implementation should scale better with
larger numbers of threads.

- Add a new class: opal_fifo.h. The new class has atomic, non-atomic,
and opal_using_threads() conditoned routines. It should be used when
first-in first-out is required and should perform much better than
using locks. Like with opal_lifo_t there are two versions of the
atomic implementation: 128-bit compare-and-swap, and spin-locked.
More implementations can be added later (LL/SC comes to mind).

- Add threading unit tests for both the opal_lifo_t and opal_fifo_t.