diff options
Diffstat (limited to 'sys/lockstack.h')
| -rw-r--r-- | sys/lockstack.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/lockstack.h b/sys/lockstack.h new file mode 100644 index 0000000..f41f9dc --- /dev/null +++ b/sys/lockstack.h @@ -0,0 +1,18 @@ +#ifndef _JOVE_SYS_LOCKSTACK_H +#define _JOVE_SYS_LOCKSTACK_H 1 + +#include <stddef.h> +#include "hal/obj.h" +#include "config.h" + +typedef struct lockstack +{ + size_t depth; + jove_owned_obj_t *stack[LOCKSTACK_MAX]; +} lockstack_t; + +jove_owned_obj_t *lockstack_push(lockstack_t *stack, jove_owned_obj_t *obj); +jove_obj_t *lockstack_pop(lockstack_t *stack); +void lockstack_popall(lockstack_t *stack); + +#endif |
