11 static pthread_t children
[3];
13 void bad_things(int offset
)
15 char* m
= malloc(sizeof(char)*offset
);
20 void* child_fn_2 ( void* arg
)
22 const char* threadname
= "012345678901234";
24 # if !defined(VGO_darwin)
25 pthread_setname_np(pthread_self(), threadname
);
27 pthread_setname_np(threadname
);
35 void* child_fn_1 ( void* arg
)
37 const char* threadname
= "try1";
40 # if !defined(VGO_darwin)
41 pthread_setname_np(pthread_self(), threadname
);
43 pthread_setname_np(threadname
);
48 r
= pthread_create(&children
[2], NULL
, child_fn_2
, NULL
);
51 r
= pthread_join(children
[2], NULL
);
57 void* child_fn_0 ( void* arg
)
63 r
= pthread_create(&children
[1], NULL
, child_fn_1
, NULL
);
66 r
= pthread_join(children
[1], NULL
);
72 int main(int argc
, const char** argv
)
78 r
= pthread_create(&children
[0], NULL
, child_fn_0
, NULL
);
81 r
= pthread_join(children
[0], NULL
);