Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: tests/threads/newlib_stdio_test.c

Issue 3298014: Add a failing test for a race in newlib. (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #include <pthread.h>
2 #include <stdio.h>
3 #include <unistd.h>
4
5 void *thr0(void* arg) {
6 fopen("/tmp/z0", "w");
7 return 0;
8 }
9
10 void *thr1(void* arg) {
11 usleep(500000);
12 printf("success, %d\n", 1);
13 return 0;
14 }
15
16 int main(int argc, char *argv[]) {
17 pthread_t t0, t1;
18
19 pthread_create(&t0, NULL, thr0, NULL);
20 pthread_create(&t1, NULL, thr1, NULL);
21
22 pthread_join(t0, NULL);
23 pthread_join(t1, NULL);
24
25 return 0;
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698