Permalink
Browse files

Fix occasional segfault

  • Loading branch information...
1 parent eb8dccc commit d15824ccd1c2f9e092164573bde55b8c55b4fe64 @rigtorp committed Mar 15, 2010
Showing with 12 additions and 12 deletions.
  1. +2 −2 pipe_lat.c
  2. +2 −2 pipe_thr.c
  3. +2 −2 tcp_lat.c
  4. +2 −2 tcp_thr.c
  5. +2 −2 unix_lat.c
  6. +2 −2 unix_thr.c
View
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
}
} else { /* parent */
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1000000 +
stop.tv_usec - start.tv_usec);
View
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
} else {
/* parent */
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
if (write(fds[1], buf, size) != size) {
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
}
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1e6 +
stop.tv_usec - start.tv_usec);
View
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
exit(1);
}
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1e6 +
stop.tv_usec - start.tv_usec);
View
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
exit(1);
}
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
if (write(sockfd, buf, size) != size) {
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
}
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1e6 +
stop.tv_usec - start.tv_usec);
View
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
}
} else { /* parent */
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1e6 +
stop.tv_usec - start.tv_usec);
View
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
} else {
/* parent */
- gettimeofday(&start);
+ gettimeofday(&start, NULL);
for (i = 0; i < count; i++) {
if (write(fds[0], buf, size) != size) {
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
}
}
- gettimeofday(&stop);
+ gettimeofday(&stop, NULL);
delta = ((stop.tv_sec - start.tv_sec) * (int64_t) 1e6 +
stop.tv_usec - start.tv_usec);

0 comments on commit d15824c

Please sign in to comment.