projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: compile libconfig as C++
[lttng-tools.git]
/
src
/
common
/
index-allocator.h
diff --git
a/src/common/index-allocator.h
b/src/common/index-allocator.h
index 3da733e9ef03db82c4f08a33345de07dbef0df8a..93ab5ddd5e1483cd268e1129d5565c5d70cdb1e6 100644
(file)
--- a/
src/common/index-allocator.h
+++ b/
src/common/index-allocator.h
@@
-9,6
+9,11
@@
#define _COMMON_INDEX_ALLOCATOR_H
#include <inttypes.h>
#define _COMMON_INDEX_ALLOCATOR_H
#include <inttypes.h>
+#include <lttng/lttng-export.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
struct lttng_index_allocator;
struct lttng_index_allocator;
@@
-21,19
+26,19
@@
enum lttng_index_allocator_status {
/*
* Create an index allocator of `index_count` slots.
*/
/*
* Create an index allocator of `index_count` slots.
*/
-struct lttng_index_allocator *lttng_index_allocator_create(
+
LTTNG_EXPORT
struct lttng_index_allocator *lttng_index_allocator_create(
uint64_t index_count);
/*
* Get the number of indexes currently in use.
*/
uint64_t index_count);
/*
* Get the number of indexes currently in use.
*/
-uint64_t lttng_index_allocator_get_index_count(
+
LTTNG_EXPORT
uint64_t lttng_index_allocator_get_index_count(
struct lttng_index_allocator *allocator);
/*
* Allocate (i.e. reserve) a slot.
*/
struct lttng_index_allocator *allocator);
/*
* Allocate (i.e. reserve) a slot.
*/
-enum lttng_index_allocator_status lttng_index_allocator_alloc(
+
LTTNG_EXPORT
enum lttng_index_allocator_status lttng_index_allocator_alloc(
struct lttng_index_allocator *allocator,
uint64_t *index);
struct lttng_index_allocator *allocator,
uint64_t *index);
@@
-41,12
+46,16
@@
enum lttng_index_allocator_status lttng_index_allocator_alloc(
* Release a slot by index. The slot will be re-used by the index allocator
* in future 'alloc' calls.
*/
* Release a slot by index. The slot will be re-used by the index allocator
* in future 'alloc' calls.
*/
-enum lttng_index_allocator_status lttng_index_allocator_release(
+
LTTNG_EXPORT
enum lttng_index_allocator_status lttng_index_allocator_release(
struct lttng_index_allocator *allocator, uint64_t index);
/*
* Destroy an index allocator.
*/
struct lttng_index_allocator *allocator, uint64_t index);
/*
* Destroy an index allocator.
*/
-void lttng_index_allocator_destroy(struct lttng_index_allocator *allocator);
+LTTNG_EXPORT void lttng_index_allocator_destroy(struct lttng_index_allocator *allocator);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _COMMON_INDEX_ALLOCATOR_H */
#endif /* _COMMON_INDEX_ALLOCATOR_H */
This page took
0.024228 seconds
and
4
git commands to generate.