Made tests build on SPARC
[akaros.git] / tests / pthread_test.c
1 #include <stdio.h>
2 #include <pthread.h>
3
4 int thread_num;
5 pthread_t t0;
6 pthread_t t1;
7
8 __thread int my_id;
9 void *thread(void* arg)
10 {       
11         my_id = thread_num++;
12         printf("thread %d\n", my_id);
13 }
14
15 int main(int argc, char** argv) 
16 {
17         thread_num = 0;
18         pthread_create(&t0, NULL, &thread, NULL);
19 //      pthread_create(&t1, NULL, &thread, NULL);
20
21         pthread_join(t0, NULL);
22 //      pthread_join(t1, NULL);
23