Add enomem and swapcontext tests to .gitignore
[valgrind.git] / helgrind / tests / hg05_race2.c
blobde01f2c490b5f877771ec5281692eb9eceef8d53
1 /* A simple race - test symaddr */
3 #include <pthread.h>
4 #include <unistd.h>
6 struct foo {
7 struct bar {
8 int plop[22];
9 char biff;
10 } poot[11];
13 static void *th(void *v)
15 struct foo *f = (struct foo *)v;
17 f->poot[5].plop[11]++;
19 return 0;
22 int main()
24 struct foo foo;
25 pthread_t a, b;
27 pthread_create(&a, NULL, th, &foo);
28 sleep(1); /* force ordering */
29 pthread_create(&b, NULL, th, &foo);
31 pthread_join(a, NULL);
32 pthread_join(b, NULL);
34 return 0;