OpenMPI
0.1.1
|
#include "opal_config.h"
#include "opal/threads/threads.h"
#include "opal/class/opal_object.h"
#include "opal/util/output.h"
Go to the source code of this file.
Data Structures | |
struct | opal_ring_buffer_t |
dynamic pointer ring More... | |
Typedefs | |
typedef struct opal_ring_buffer_t | opal_ring_buffer_t |
Convenience typedef. | |
Functions | |
OPAL_DECLSPEC | OBJ_CLASS_DECLARATION (opal_ring_buffer_t) |
Class declaration. | |
OPAL_DECLSPEC int | opal_ring_buffer_init (opal_ring_buffer_t *ring, int size) |
Initialize the ring buffer, defining its size. More... | |
OPAL_DECLSPEC void * | opal_ring_buffer_push (opal_ring_buffer_t *ring, void *ptr) |
Push an item onto the ring buffer. More... | |
OPAL_DECLSPEC void * | opal_ring_buffer_pop (opal_ring_buffer_t *ring) |
Pop an item off of the ring. More... | |
OPAL_DECLSPEC void * | opal_ring_buffer_poke (opal_ring_buffer_t *ring, int i) |
OPAL_DECLSPEC int opal_ring_buffer_init | ( | opal_ring_buffer_t * | ring, |
int | size | ||
) |
Initialize the ring buffer, defining its size.
ring | Pointer to a ring buffer (IN/OUT) |
size | The number of elements in the ring (IN) |
Initialize the ring buffer, defining its size.
References opal_ring_buffer_t::addr, opal_ring_buffer_t::size, and opal_pointer_array_t::size.
OPAL_DECLSPEC void* opal_ring_buffer_pop | ( | opal_ring_buffer_t * | ring | ) |
Pop an item off of the ring.
The oldest entry on the ring will be returned. If nothing on the ring, NULL is returned.
ring | Pointer to ring (IN) |
References opal_ring_buffer_t::addr, opal_ring_buffer_t::lock, and opal_ring_buffer_t::size.
OPAL_DECLSPEC void* opal_ring_buffer_push | ( | opal_ring_buffer_t * | ring, |
void * | ptr | ||
) |
Push an item onto the ring buffer.
ring | Pointer to ring (IN) |
ptr | Pointer value (IN) |
References opal_ring_buffer_t::addr, opal_ring_buffer_t::lock, and opal_ring_buffer_t::size.