1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2008 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2016-2020 Intel, Inc. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file
*
*/
/**
* dynamic pointer ring
*/
;
/**
* Convenience typedef
*/
typedef struct pmix_ring_buffer_t pmix_ring_buffer_t;
/**
* Class declaration
*/
;
/**
* Initialize the ring buffer, defining its size.
*
* @param ring Pointer to a ring buffer (IN/OUT)
* @param size The number of elements in the ring (IN)
*
* @return PMIX_SUCCESS if all initializations were successful. Otherwise,
* the error indicate what went wrong in the function.
*/
PMIX_EXPORT int ;
/**
* Push an item onto the ring buffer, displacing the oldest
* item on the ring if the ring is full
*
* @param ring Pointer to ring (IN)
* @param ptr Pointer value (IN)
*
* @return Pointer to displaced item, NULL if ring
* is not yet full
*/
PMIX_EXPORT void *;
/**
* Pop an item off of the ring. The oldest entry on the ring will be
* returned. If nothing on the ring, NULL is returned.
*
* @param ring Pointer to ring (IN)
*
* @return Error code. NULL indicates an error.
*/
PMIX_EXPORT void *;
/*
* Access an element of the ring, without removing it, indexed
* starting at the tail - a value of -1 will return the element
* at the head of the ring
*/
PMIX_EXPORT void *;
/* PMIX_RING_BUFFER_H */