| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 5 | * |
| 6 | * Common Trace Format Object Stack. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _OBJSTACK_H |
| 10 | #define _OBJSTACK_H |
| 11 | |
| 12 | #include "common/macros.h" |
| 13 | |
| 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 */ |