|
@@ -1,18 +1,18 @@
|
|
| 1 |
-
#ifndef
|
| 2 |
-
#define
|
| 3 |
|
| 4 |
#include <stddef.h>
|
| 5 |
|
| 6 |
-
typedef struct
|
| 7 |
|
| 8 |
-
static const size_t
|
| 9 |
|
| 10 |
-
|
| 11 |
-
void
|
| 12 |
-
size_t
|
| 13 |
-
void*
|
| 14 |
-
int
|
| 15 |
-
size_t
|
| 16 |
-
int
|
| 17 |
|
| 18 |
-
#endif //
|
| 1 |
+
#ifndef ARRAY_MUTEX_H
|
| 2 |
+
#define ARRAY_MUTEX_H
|
| 3 |
|
| 4 |
#include <stddef.h>
|
| 5 |
|
| 6 |
+
typedef struct array_mutex array_mutex_t;
|
| 7 |
|
| 8 |
+
static const size_t array_mutex_not_found = (size_t)-1;
|
| 9 |
|
| 10 |
+
array_mutex_t* array_mutex_create(size_t capacity);
|
| 11 |
+
void array_mutex_destroy(array_mutex_t* array);
|
| 12 |
+
size_t array_mutex_get_count(array_mutex_t *array);
|
| 13 |
+
void* array_mutex_get_element(array_mutex_t* array, size_t index);
|
| 14 |
+
int array_mutex_append(array_mutex_t* array, void* element);
|
| 15 |
+
size_t array_mutex_find_first(array_mutex_t *array, const void* element, size_t start_pos);
|
| 16 |
+
int array_mutex_remove_first(array_mutex_t* array, const void* element, size_t start_pos);
|
| 17 |
|
| 18 |
+
#endif // ARRAY_MUTEX_H
|