summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/select.c
blob: 088211e289d6d01e697b7dad4d67be0bf84e8d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* COVERAGE: select pselect6 pselect7 */
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/select.h>
#include <signal.h>
#include <sys/syscall.h>

int main()
{
  int fd;
  struct timespec tim = {0, 200000000};
  sigset_t sigs;
  fd_set rfds;
  struct timeval tv = {0, 117};

  sigemptyset(&sigs);
  sigaddset(&sigs,SIGUSR2);

  select( 1, &rfds, NULL, NULL, &tv);
  //staptest// select (1, XXXX, 0x[0]+, 0x[0]+, \[0.000117\])

  tv.tv_sec = 0;
  tv.tv_usec = 113;

  select( 1, NULL, NULL, NULL, &tv);
  //staptest// select (1, 0x[0]+, 0x[0]+, 0x[0]+, \[0.000113\])

#ifdef SYS_pselect6
  pselect( 1, &rfds, NULL, NULL, &tim, &sigs);
  //staptest//pselect[67] (1, XXXX, 0x[0]+, 0x[0]+, \[0.200000000\], XXXX)

  pselect( 0, NULL, NULL, NULL, &tim, &sigs);
  //staptest// pselect[67] (0, 0x[0]+, 0x[0]+, 0x[0]+, \[0.200000000\], XXXX) =
#endif

  return 0;
}