summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/eventfd.c
blob: f204ddebab559d3d5ad86dd078413ae9559a22a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}