summaryrefslogtreecommitdiffstats
path: root/include/libtf/defines.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-25 10:52:15 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-25 10:52:15 +0200
commitfc1044daf51f32b9d85f8497e4e0bd5a3c1e7fe9 (patch)
tree52e11c88f17c47c0d086761e50b266f5c5ccd061 /include/libtf/defines.h
parentcec85dedb7fd66cf2c23cafadd7c53eb7afed78f (diff)
downloadlibtf-fc1044daf51f32b9d85f8497e4e0bd5a3c1e7fe9.tar.bz2
libtf-fc1044daf51f32b9d85f8497e4e0bd5a3c1e7fe9.tar.xz
libtf: implement basic file i/o with epoll
some scetching of i/o api, and implement basic read and write functionality. integrate polling to scheduler and an epoll based polling mechanism.
Diffstat (limited to 'include/libtf/defines.h')
-rw-r--r--include/libtf/defines.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libtf/defines.h b/include/libtf/defines.h
index b1d2aa9..144ad63 100644
--- a/include/libtf/defines.h
+++ b/include/libtf/defines.h
@@ -53,6 +53,9 @@
#define attribute_never_inline __attribute__((noinline))
#define attribute_weak_function __attribute__((weak))
+#define attribute_noreturn __attribute__((noreturn))
+#define attribute_warn_unused_result __attribute__((warn_unused_result))
+#define attribute_deprecated __attribute__((deprecated))
#define TF_BUG_ON(cond) if (unlikely(cond)) { \
fprintf(stderr, "BUG: failure at %s:%d/%s(): %s!\n", \
@@ -69,6 +72,8 @@
#endif
/* Monotonic time */
+#define TF_INFINITE -1
+
typedef uint32_t tf_mtime_t;
typedef int32_t tf_mtime_diff_t;