1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 * Copyright (C) 2020-2021 Paul Cercueil <paul@crapouillou.net>
6 #ifndef __LIGHTREC_REAPER_H__
7 #define __LIGHTREC_REAPER_H__
12 typedef void (*reap_func_t)(struct lightrec_state *state, void *);
14 struct reaper *lightrec_reaper_init(struct lightrec_state *state);
15 void lightrec_reaper_destroy(struct reaper *reaper);
17 int lightrec_reaper_add(struct reaper *reaper, reap_func_t f, void *data);
18 void lightrec_reaper_reap(struct reaper *reaper);
20 void lightrec_reaper_pause(struct reaper *reaper);
21 void lightrec_reaper_continue(struct reaper *reaper);
23 #endif /* __LIGHTREC_REAPER_H__ */