source: lib/data-struct/vector.h @ 17a3dff

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivelibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 17a3dff was abda273, checked in by Richard Sanger <rsangerarj@…>, 7 years ago

Remove inline functions that cause compile warnings when building external applications.

  • Property mode set to 100644
File size: 971 bytes
Line 
1#include <pthread.h>
2/* Need libtrace.h for DLLEXPORT defines */
3#include "../libtrace.h"
4
5#ifndef LIBTRACE_VECTOR_H
6#define LIBTRACE_VECTOR_H
7
8typedef struct libtrace_vector {
9        size_t max_size;
10        size_t size;
11        size_t element_size;
12        char *elements; // Means we can use array indexing
13        pthread_mutex_t lock;
14} libtrace_vector_t;
15
16DLLEXPORT void libtrace_vector_init(libtrace_vector_t *v, size_t element_size);
17DLLEXPORT void libtrace_vector_push_back(libtrace_vector_t *v, void *d);
18DLLEXPORT size_t libtrace_vector_get_size(libtrace_vector_t *v);
19DLLEXPORT int libtrace_vector_get(libtrace_vector_t *v, size_t location, void *d);
20DLLEXPORT void libtrace_vector_append(libtrace_vector_t *dest, libtrace_vector_t *src);
21DLLEXPORT void libtrace_vector_destroy(libtrace_vector_t *v);
22DLLEXPORT void libtrace_zero_vector(libtrace_vector_t *v);
23DLLEXPORT int libtrace_vector_remove_front(libtrace_vector_t *v);
24DLLEXPORT void libtrace_vector_empty(libtrace_vector_t *v);
25#endif
Note: See TracBrowser for help on using the repository browser.