summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.syscall')
-rw-r--r--testsuite/systemtap.syscall/eventfd.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/systemtap.syscall/eventfd.c b/testsuite/systemtap.syscall/eventfd.c
new file mode 100644
index 00000000..f204ddeb
--- /dev/null
+++ b/testsuite/systemtap.syscall/eventfd.c
@@ -0,0 +1,21 @@
+/* COVERAGE: eventfd eventfd2 */
+#include <sys/eventfd.h>
+
+int main()
+{
+ int fd = eventfd(0, 0);
+ //staptest// eventfd (0) = NNNN
+
+#ifdef EFD_NONBLOCK
+ fd = eventfd(1, EFD_NONBLOCK);
+ //staptest// eventfd2 (1, EFD_NONBLOCK) = NNNN
+
+ fd = eventfd(2, EFD_CLOEXEC);
+ //staptest// eventfd2 (2, EFD_CLOEXEC) = NNNN
+
+ fd = eventfd(3, EFD_NONBLOCK|EFD_CLOEXEC);
+ //staptest// eventfd2 (3, EFD_NONBLOCK|EFD_CLOEXEC) = NNNN
+#endif
+
+ return 0;
+}