diff options
author | Mark Wielaard <mjw@redhat.com> | 2010-03-20 22:43:51 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2010-03-21 17:34:41 +0100 |
commit | c01a52256bfbd9a3d2873b2d48f7f94177d14641 (patch) | |
tree | 7767a9acc35a98e93f4d05fdd63db3d83ab3bbdf /testsuite | |
parent | 9d2d9895621fdfe5c73034039183fc2fc31a1495 (diff) | |
download | systemtap-steved-c01a52256bfbd9a3d2873b2d48f7f94177d14641.tar.gz systemtap-steved-c01a52256bfbd9a3d2873b2d48f7f94177d14641.tar.xz systemtap-steved-c01a52256bfbd9a3d2873b2d48f7f94177d14641.zip |
Add support for eventfd2 to syscall.stp tapset.
* tapset/aux_syscalls.stp (_eventfd2_flag_str): New utility function.
* tapset/syscalls.stp (syscall.eventfd[.return]): Add alternatives to
handle eventfd2.
* testsuite/systemtap.syscall/eventfd.c: New test.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/systemtap.syscall/eventfd.c | 21 |
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; +} |