Lines Matching +full:sync +full:- +full:read
40 mycc -o sendmsg -Wall -Wextra -O0 -g sendmsg.c || exit 1
41 rm -f sendmsg.c
44 daemon sh -c "(cd ../testcases/swap; ./swap -t 5m -i 20 -k -h)" > /dev/null
49 while pgrep -q swap; do
50 pkill -9 swap
52 rm -f /tmp/sendmsg sendmsg.core
55 while pgrep -q sendmsg; do
56 pkill -9 sendmsg
58 [ $n -gt 20 ] && { echo "Looping sendmsg"; exit 1; }
85 #define SYNC 0
135 atomic_add_int(&share[SYNC], 1);
136 while (share[SYNC] != PARALLEL)
150 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
155 if ((pid = fork()) == -1)
166 cmsg->cmsg_level = SOL_SOCKET;
167 cmsg->cmsg_type = SCM_RIGHTS;
181 if (cmsg->cmsg_type != SCM_RIGHTS)
187 n = read(fd, buf, sizeof(buf));
189 err(1, "read");
191 printf("read %d bytes\n", n);
207 MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
211 while ((time(NULL) - start) < RUNTIME) {
212 share[SYNC] = 0;