Index: stable/10/tools/regression/tls/ttls2/ttls2.c =================================================================== --- stable/10/tools/regression/tls/ttls2/ttls2.c (revision 292141) +++ stable/10/tools/regression/tls/ttls2/ttls2.c (revision 292142) @@ -1,36 +1,42 @@ /* $FreeBSD$ */ -#include #include +#include +#include int __thread i; void * foo1(void *arg) { printf("thread %p, &i = %p\n", pthread_self(), &i); for (i = 0; i < 10; i++) { printf("thread %p, i = %d\n", pthread_self(), i); sleep(1); } + return (NULL); } void * foo2(void *arg) { printf("thread %p, &i = %p\n", pthread_self(), &i); for (i = 10; i > 0; i--) { printf("thread %p, i = %d\n", pthread_self(), i); sleep(1); } + return (NULL); } -int main(int argc, char** argv) +int +main(int argc, char** argv) { pthread_t t1, t2; pthread_create(&t1, 0, foo1, 0); pthread_create(&t2, 0, foo2, 0); pthread_join(t1, 0); pthread_join(t2, 0); + + return (0); } Index: stable/10/tools/regression/tls/ttls4/ttls4.c =================================================================== --- stable/10/tools/regression/tls/ttls4/ttls4.c (revision 292141) +++ stable/10/tools/regression/tls/ttls4/ttls4.c (revision 292142) @@ -1,41 +1,44 @@ /* * This program tests if a new thread's initial tls data * is clean. * * David Xu * * $FreeBSD$ */ #include #include +#include #include int __thread n; -void *f1(void *arg) +void +*f1(void *arg) { if (n != 0) { printf("bug, n == %d \n", n); exit(1); } n = 1; return (0); } -int main() +int +main(void) { pthread_t td; int i; for (i = 0; i < 1000; ++i) { pthread_create(&td, NULL, f1, NULL); pthread_join(td, NULL); } sleep(2); for (i = 0; i < 1000; ++i) { pthread_create(&td, NULL, f1, NULL); pthread_join(td, NULL); } return (0); } Index: stable/10 =================================================================== --- stable/10 (revision 292141) +++ stable/10 (revision 292142) Property changes on: stable/10 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r291983-291984