diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-04-05 14:13:45 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-04-05 14:13:45 +0000 |
commit | d8fe99d98c4ede4ff6ecc7d702c902c536d8b5f3 (patch) | |
tree | 7a3b430f3f179126509665c593d8a2973cd7588f /src/tools/thread | |
parent | a86c329f99bf9cccb98a80f6d01316fb5305a169 (diff) | |
download | postgresql-d8fe99d98c4ede4ff6ecc7d702c902c536d8b5f3.tar.gz postgresql-d8fe99d98c4ede4ff6ecc7d702c902c536d8b5f3.zip |
Add comment that sched_yield might be a portability problem.
Diffstat (limited to 'src/tools/thread')
-rw-r--r-- | src/tools/thread/thread_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/thread/thread_test.c b/src/tools/thread/thread_test.c index 903462755f1..dc8e3689bea 100644 --- a/src/tools/thread/thread_test.c +++ b/src/tools/thread/thread_test.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.14 2004/04/05 14:12:32 momjian Exp $ + * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.15 2004/04/05 14:13:45 momjian Exp $ * * This program tests to see if your standard libc functions use * pthread_setspecific()/pthread_getspecific() to be thread-safe. @@ -83,7 +83,7 @@ defines to your template/$port file before compiling this program.\n\n" pthread_create(&thread2, NULL, (void * (*)(void *)) func_call_2, NULL); while (thread1_done == 0 || thread2_done == 0) - sched_yield(); /* force system call */ + sched_yield(); /* if this is a portability problem, remove it */ printf("Add this to your template/$port file:\n\n"); @@ -129,7 +129,7 @@ void func_call_1(void) { */ errno1_set = 1; while (errno2_set == 0) - sched_yield(); /* force system call */ + sched_yield(); if (errno != EEXIST) { fprintf(stderr, "errno not thread-safe; exiting\n"); @@ -184,7 +184,7 @@ void func_call_2(void) { */ errno2_set = 1; while (errno1_set == 0) - sched_yield(); /* force system call */ + sched_yield(); if (errno != ENOENT) { fprintf(stderr, "errno not thread-safe; exiting\n"); |