]> granicus.if.org Git - postgresql/commitdiff
Tighten casting of function call pointers for threads.
authorBruce Momjian <bruce@momjian.us>
Wed, 3 Sep 2003 22:34:08 +0000 (22:34 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 3 Sep 2003 22:34:08 +0000 (22:34 +0000)
src/template/linux
src/tools/test_thread_funcs.c

index 070e260a27687f1afa295a7f8aa2b49bcdb3c236..db13803710ec60f8be870ff10dca8f56f1a7e645 100644 (file)
@@ -1,7 +1,7 @@
 CFLAGS=-O2
 
 SUPPORTS_THREADS=yes
-NEED_REENTRANT_FUNC_NAMES=yes
+NEED_REENTRANT_FUNC_NAMES=yes  # verified glibc 2.1 2003-09-03
 THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
 THREAD_LIBS="-lpthread"
 
index 9d7b3ab83aed4696634c1e4490ec5de2295a00a8..6fc781a2b64f40ebaf540782cd8e53d3cf291dad 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- *     $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.2 2003/09/03 19:36:31 momjian Exp $
+ *     $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.3 2003/09/03 22:34:08 momjian Exp $
  *
  *     This program tests to see if your standard libc functions use
  *     pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -57,8 +57,8 @@ int main(int argc, char *argv[])
                        return 1;
        }
 
-       pthread_create(&thread1, NULL, (void *) func_call_1, NULL);
-       pthread_create(&thread2, NULL, (void *) func_call_2, NULL);
+       pthread_create(&thread1, NULL, (void * (*)(void *)) func_call_1, NULL);
+       pthread_create(&thread2, NULL, (void * (*)(void *)) func_call_2, NULL);
        pthread_join(thread1, NULL);
        pthread_join(thread2, NULL);