1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 /* Copyright (C) 2022, Linaro Ltd - Daniel Lezcano <daniel.lezcano@linaro.org> */
3 #ifndef __THERMAL_TOOLS_MAINLOOP_H
4 #define __THERMAL_TOOLS_MAINLOOP_H
6 typedef int (*mainloop_callback_t
)(int fd
, void *data
);
8 extern int mainloop(unsigned int timeout
);
9 extern int mainloop_add(int fd
, mainloop_callback_t cb
, void *data
);
10 extern int mainloop_del(int fd
);
11 extern void mainloop_exit(void);
12 extern int mainloop_init(void);
13 extern void mainloop_fini(void);