|
6 | 6 | * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California
|
8 | 8 | *
|
9 |
| - * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.14 2004/04/05 14:12:32 momjian Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.15 2004/04/05 14:13:45 momjian Exp $ |
10 | 10 | *
|
11 | 11 | * This program tests to see if your standard libc functions use
|
12 | 12 | * pthread_setspecific()/pthread_getspecific() to be thread-safe.
|
@@ -83,7 +83,7 @@ defines to your template/$port file before compiling this program.\n\n"
|
83 | 83 | pthread_create(&thread2, NULL, (void * (*)(void *)) func_call_2, NULL);
|
84 | 84 |
|
85 | 85 | while (thread1_done == 0 || thread2_done == 0)
|
86 |
| - sched_yield(); /* force system call */ |
| 86 | + sched_yield(); /* if this is a portability problem, remove it */ |
87 | 87 |
|
88 | 88 | printf("Add this to your template/$port file:\n\n");
|
89 | 89 |
|
@@ -129,7 +129,7 @@ void func_call_1(void) {
|
129 | 129 | */
|
130 | 130 | errno1_set = 1;
|
131 | 131 | while (errno2_set == 0)
|
132 |
| - sched_yield(); /* force system call */ |
| 132 | + sched_yield(); |
133 | 133 | if (errno != EEXIST)
|
134 | 134 | {
|
135 | 135 | fprintf(stderr, "errno not thread-safe; exiting\n");
|
@@ -184,7 +184,7 @@ void func_call_2(void) {
|
184 | 184 | */
|
185 | 185 | errno2_set = 1;
|
186 | 186 | while (errno1_set == 0)
|
187 |
| - sched_yield(); /* force system call */ |
| 187 | + sched_yield(); |
188 | 188 | if (errno != ENOENT)
|
189 | 189 | {
|
190 | 190 | fprintf(stderr, "errno not thread-safe; exiting\n");
|
|
0 commit comments