Lines Matching +full:sync +full:- +full:token
32 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
38 mycc -o pipe2 -Wall -Wextra -O0 -g pipe2.c || exit 1
39 rm -f pipe2.c
41 daemon sh -c "(cd $odir/../testcases/swap; ./swap -t 10m -i 20)" > \
45 su $testuser -c /tmp/pipe2
48 while pgrep -q swap; do
49 pkill -9 swap
52 rm -rf /tmp/pipe2
71 #define R1 1 /* sync start */
88 int token;
92 MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
95 if (pipe(fds) == -1)
97 token = 0;
98 write(fds[1], &token, sizeof(token));
104 if (read(fds[0], &token, sizeof(token)) != sizeof(token))
107 if (pipe(fds) == -1)
109 token++;
110 if (write(fds[1], &token, sizeof(token)) != sizeof(token))
113 if (r == -1)
121 if (read(fds[0], &token, sizeof(token)) != sizeof(token))
123 fprintf(stderr, "FINAL read %d from %d\n", token, fds[0]);
139 MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
145 if (sigaction(SIGCHLD, &sa, 0) == -1)