From a6fea7f6edd0084b0d48b5c2ad87a1bb234c93e7 Mon Sep 17 00:00:00 2001 From: cgf Date: Sat, 19 May 2001 05:28:59 +0000 Subject: [PATCH] * grp.cc (read_etc_group): Don't copy mutex on fork. * pwd.cc (read_etc_passwd): Ditto. * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL specific area. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/autoload.cc | 12 +++--------- winsup/cygwin/grp.cc | 2 +- winsup/cygwin/passwd.cc | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c187f134fa..62d76f2702 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Sat May 19 01:22:43 2001 Christopher Faylor + + * grp.cc (read_etc_group): Don't copy mutex on fork. + * pwd.cc (read_etc_passwd): Ditto. + * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL + specific area. + Fri May 18 10:31:00 2001 Corinna Vinschen * net.cc (wsock_event::wait): Explicitely cancel IO when a signal diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index d291fdc337..1348e52637 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -74,15 +74,9 @@ details. */ #define LoadDLLfunc(name, n, dllname) LoadDLLfuncEx (name, n, dllname, 0) /* Main DLL setup stuff. */ -#define LoadDLLfuncEx(name, n, dllname, notimp) __asm__ ("\ - .section ." #dllname "_info,\"w\" \n\ - .linkonce \n\ - .long std_dll_init \n\ - .long 0 \n\ - .long -1 \n\ - .long dll_func_load \n\ - .asciz \"" #dllname "\" \n\ - \n\ +#define LoadDLLfuncEx(name, n, dllname, notimp) \ + LoadDLLprime (dllname, dll_func_load) \ + __asm__ (" \n\ .section ." #dllname "_text,\"wx\" \n\ .global _" mangle (name, n) " \n\ .global _win32_" mangle (name, n) " \n\ diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index d815216687..604f1a8d63 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -140,7 +140,7 @@ read_etc_group () strncpy (group_name, "Administrators", sizeof (group_name)); - static pthread_mutex_t etc_group_mutex = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; + static NO_COPY pthread_mutex_t etc_group_mutex = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock (&etc_group_mutex); /* if we got blocked by the mutex, then etc_group may have been processed */ diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 6959f34e35..7c214987cc 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -127,7 +127,7 @@ read_etc_passwd () * for non-shared mutexs in the future. Also, this function will at most be called * once from each thread, after that the passwd_state test will succeed */ - static pthread_mutex_t etc_passwd_mutex = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; + static NO_COPY pthread_mutex_t etc_passwd_mutex = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock (&etc_passwd_mutex); /* if we got blocked by the mutex, then etc_passwd may have been processed */ -- 2.11.0