summaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-05-08 20:21:00 -0700
committerElliott Hughes <enh@google.com>2013-05-14 14:45:02 -0700
commit4200e6203aaa67c37874ad2b2271bff920297c7f (patch)
tree5b2ff689915ec6230345c3d020e4f59da678e08f /libc/include
parente1c58ab5bb6284b3e3a2d0e54c295a93780b3f70 (diff)
downloadbionic-4200e6203aaa67c37874ad2b2271bff920297c7f.zip
bionic-4200e6203aaa67c37874ad2b2271bff920297c7f.tar.gz
bionic-4200e6203aaa67c37874ad2b2271bff920297c7f.tar.bz2
libc: add timerfd calls
(cherry-pick of 04c0ac14a49e0969333008a9522b64046d58fbdc.) Change-Id: I06d0b6c2a8781602362b81f48faf1cca76b9ec05
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/sys/timerfd.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/libc/include/sys/timerfd.h b/libc/include/sys/timerfd.h
new file mode 100644
index 0000000..0651f1c
--- /dev/null
+++ b/libc/include/sys/timerfd.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SYS_TIMERFD_H_
+#define _SYS_TIMERFD_H_
+
+#include <time.h>
+#include <sys/types.h>
+#include <linux/timerfd.h>
+
+__BEGIN_DECLS
+
+extern int timerfd_create(clockid_t, int);
+extern int timerfd_settime(int, int, const struct itimerspec*,
+ struct itimerspec*);
+extern int timerfd_gettime(int, struct itimerspec*);
+
+__END_DECLS
+
+#endif /* _SYS_TIMERFD_H */