Commit | Line | Data |
---|---|---|
e98a2d6e | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
e98a2d6e | 3 | * |
0235b0db | 4 | * Copyright 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
e98a2d6e | 5 | * |
0235b0db | 6 | * Common Trace Format Object Stack. |
e98a2d6e PP |
7 | */ |
8 | ||
0235b0db MJ |
9 | #ifndef _OBJSTACK_H |
10 | #define _OBJSTACK_H | |
11 | ||
91d81473 MJ |
12 | #include "common/macros.h" |
13 | ||
e98a2d6e PP |
14 | struct objstack; |
15 | ||
16 | BT_HIDDEN | |
17 | struct objstack *objstack_create(void); | |
18 | BT_HIDDEN | |
19 | void objstack_destroy(struct objstack *objstack); | |
20 | ||
21 | /* | |
22 | * Allocate len bytes of zeroed memory. | |
23 | * Return NULL on error. | |
24 | */ | |
25 | BT_HIDDEN | |
26 | void *objstack_alloc(struct objstack *objstack, size_t len); | |
27 | ||
28 | #endif /* _OBJSTACK_H */ |