blob: d4942ab4030c4903380c0cf99f7216bbbb8a96dd [file] [log] [blame]
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00001/*
2 * Power debug tool (powerdebug)
Daniel Lezcano8be52602011-06-21 00:57:08 +02003 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00004 * Copyright (C) 2016, Linaro Limited.
Daniel Lezcano8be52602011-06-21 00:57:08 +02005 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00006 * 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 Lezcano8be52602011-06-21 00:57:08 +020010 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +000011 * 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 Lezcano8be52602011-06-21 00:57:08 +020015 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +000016 * 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 Lezcano8be52602011-06-21 00:57:08 +020021
22typedef int (*mainloop_callback_t)(int fd, void *data);
23
Daniel Lezcanodb145802011-06-21 00:57:08 +020024extern int mainloop(unsigned int timeout);
Daniel Lezcano8be52602011-06-21 00:57:08 +020025extern int mainloop_add(int fd, mainloop_callback_t cb, void *data);
26extern int mainloop_del(int fd);
27extern int mainloop_init(void);
28extern void mainloop_fini(void);