summaryrefslogtreecommitdiff
path: root/inotail.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-09-26 13:52:53 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2006-09-26 13:52:53 +0200
commit26cc319274f9f7e99a56d55c3fd0872e2e2527a1 (patch)
treea8e71554bb4b89f5010ed48778cced671fb6bed3 /inotail.h
parent52ab266b8930d2b82554c8df87f8146a07e5f33b (diff)
Add unlikely macro
And use it for a really unlikely case
Diffstat (limited to 'inotail.h')
-rw-r--r--inotail.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/inotail.h b/inotail.h
index d885855..f6e90e8 100644
--- a/inotail.h
+++ b/inotail.h
@@ -24,4 +24,7 @@ struct file_struct {
# define dprintf(fmt, args...)
#endif /* DEBUG */
+/* Taken from linux kernel source tree */
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
#endif /* _INOTAIL_H */