Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Power debug tool (powerdebug) |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 3 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 4 | * Copyright (C) 2016, Linaro Limited. |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 5 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 10 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 15 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | * |
| 20 | */ |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 21 | |
| 22 | typedef int (*mainloop_callback_t)(int fd, void *data); |
| 23 | |
Daniel Lezcano | db14580 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 24 | extern int mainloop(unsigned int timeout); |
Daniel Lezcano | 8be5260 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 25 | extern int mainloop_add(int fd, mainloop_callback_t cb, void *data); |
| 26 | extern int mainloop_del(int fd); |
| 27 | extern int mainloop_init(void); |
| 28 | extern void mainloop_fini(void); |