summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/tests/yield.c
diff options
context:
space:
mode:
Diffstat (limited to 'nsprpub/pr/tests/yield.c')
-rw-r--r--nsprpub/pr/tests/yield.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/nsprpub/pr/tests/yield.c b/nsprpub/pr/tests/yield.c
index c68166e17..eb55926b5 100644
--- a/nsprpub/pr/tests/yield.c
+++ b/nsprpub/pr/tests/yield.c
@@ -17,7 +17,7 @@
#define THREADS 10
-void
+void
threadmain(void *_id)
{
int id = (int)_id;
@@ -43,14 +43,15 @@ int main(int argc, char **argv)
for (index=0; index<THREADS; index++) {
a[index] = PR_CreateThread(PR_USER_THREAD,
- threadmain,
- (void *)index,
- PR_PRIORITY_NORMAL,
- index%2?PR_LOCAL_THREAD:PR_GLOBAL_THREAD,
- PR_JOINABLE_THREAD,
- 0);
+ threadmain,
+ (void *)index,
+ PR_PRIORITY_NORMAL,
+ index%2?PR_LOCAL_THREAD:PR_GLOBAL_THREAD,
+ PR_JOINABLE_THREAD,
+ 0);
}
- for(index=0; index<THREADS; index++)
+ for(index=0; index<THREADS; index++) {
PR_JoinThread(a[index]);
+ }
printf("main dying\n");
}