aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorRomain Perier <romain.perier@gmail.com>2012-07-18 17:03:09 +0200
committerRomain Perier <romain.perier@gmail.com>2012-07-18 17:05:44 +0200
commitac70763974e9ba20e6d87c1db7981b4da9cc2456 (patch)
tree5309a1871275362cb2f3251150c46720b7da80bc /common.h
parent0e199d07964968c9e097bce3b0bbb87f6ecfcf72 (diff)
downloadandroid-input-bridge-ac70763974e9ba20e6d87c1db7981b4da9cc2456.tar.gz
* Code refactoring
* Open uinput and create a virtual input device on demand: the virtual device is created on the first connection, it is destroyed when the last one is closed.
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.h b/common.h
index 94a7c32..6638d69 100644
--- a/common.h
+++ b/common.h
@@ -39,6 +39,9 @@
} \
} while(0)
+#define likely(x) __builtin_expect((x), 1)
+#define unlikely(x) __builtin_expect((x), 0)
+
int socketx(int domain, int type, int protocol);
int openx(const char *pathname, int flags);
void *mallocx(size_t size);