Commit | Line | Data |
---|---|---|
98fa08a5 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
6f1edc3c | 2 | /* |
98fa08a5 | 3 | * Copyright (C) 2020-2021 Paul Cercueil <paul@crapouillou.net> |
6f1edc3c PC |
4 | */ |
5 | ||
a59e5536 | 6 | #ifndef __LIGHTREC_REAPER_H__ |
7 | #define __LIGHTREC_REAPER_H__ | |
6f1edc3c | 8 | |
a59e5536 | 9 | struct lightrec_state; |
10 | struct reaper; | |
6f1edc3c | 11 | |
98fa08a5 | 12 | typedef void (*reap_func_t)(struct lightrec_state *state, void *); |
6f1edc3c | 13 | |
a59e5536 | 14 | struct reaper *lightrec_reaper_init(struct lightrec_state *state); |
15 | void lightrec_reaper_destroy(struct reaper *reaper); | |
16 | ||
17 | int lightrec_reaper_add(struct reaper *reaper, reap_func_t f, void *data); | |
18 | void lightrec_reaper_reap(struct reaper *reaper); | |
19 | ||
98fa08a5 PC |
20 | void lightrec_reaper_pause(struct reaper *reaper); |
21 | void lightrec_reaper_continue(struct reaper *reaper); | |
22 | ||
a59e5536 | 23 | #endif /* __LIGHTREC_REAPER_H__ */ |