aboutsummaryrefslogtreecommitdiff
path: root/mainloop.h
diff options
context:
space:
mode:
Diffstat (limited to 'mainloop.h')
-rw-r--r--mainloop.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/mainloop.h b/mainloop.h
new file mode 100644
index 0000000..3b4c253
--- /dev/null
+++ b/mainloop.h
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (C) 2010, Linaro Limited.
+ *
+ * This file is part of PowerDebug.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Author:
+ * Daniel Lezcano <daniel.lezcano@linaro.org>
+ *
+ *******************************************************************************/
+
+typedef int (*mainloop_callback_t)(int fd, void *data);
+
+extern int _mainloop(unsigned int timeout);
+extern int mainloop_add(int fd, mainloop_callback_t cb, void *data);
+extern int mainloop_del(int fd);
+extern int mainloop_init(void);
+extern void mainloop_fini(void);