From: Ulrich Drepper Date: Thu, 23 Mar 2000 22:16:37 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc_2-1-91~812 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=383052e98ce628ba1d5046ba663a8b70271e3eb8;p=thirdparty%2Fglibc.git Update. 2000-03-23 Ulrich Drepper * resolv/netdb.h (SCOPE_DELIMITER): New definitions. * inet/netinet/in.h (struct sockaddr_in6): Add sin6_scope_id according to RFC 2553. * sysdeps/posix/getaddrinfo.c: Change to follow latest RFC draft. * inet/getnameinfo.c: Likewise. Patches by YOSHIFUJI Hideaki . --- diff --git a/ChangeLog b/ChangeLog index 81d0653bb29..7b9a4fbea99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-03-23 Ulrich Drepper + + * resolv/netdb.h (SCOPE_DELIMITER): New definitions. + * inet/netinet/in.h (struct sockaddr_in6): Add sin6_scope_id + according to RFC 2553. + * sysdeps/posix/getaddrinfo.c: Change to follow latest RFC draft. + * inet/getnameinfo.c: Likewise. + Patches by YOSHIFUJI Hideaki . + 2000-03-23 Bruno Haible * iconv/gconv_simple.c (internal_ucs4_loop, internal_ucs4le_loop): diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 2a9683ec341..013e640831e 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,9 @@ 2000-03-23 Ulrich Drepper + * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock. + * internals.h (__pthread_reset_pthread_once): Add prototype. + * ptfork.c (__fork): Call __pthread_reset_pthread_once. + * manager.c (pthread_handle_create): Store ID of new thread before clone call. diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index 3fcec426309..8cb9b6837c0 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -395,6 +395,7 @@ int __pthread_manager(void *reqfd); int __pthread_manager_event(void *reqfd); void __pthread_manager_sighandler(int sig); void __pthread_reset_main_thread(void); +void __pthread_reset_pthread_once(void); void __fresetlockfiles(void); void __pthread_manager_adjust_prio(int thread_prio); void __pthread_set_own_extricate_if(pthread_descr self, pthread_extricate_if *peif); diff --git a/linuxthreads/mutex.c b/linuxthreads/mutex.c index 06d97df03ff..97b5a4fb844 100644 --- a/linuxthreads/mutex.c +++ b/linuxthreads/mutex.c @@ -223,3 +223,15 @@ int __pthread_once(pthread_once_t * once_control, void (*init_routine)(void)) return 0; } strong_alias (__pthread_once, pthread_once) + +/* + * This is called in the child process after a fork to make + * sure that the global mutex pthread_once is not held, + * and that the condition variable is reset to an initial state. + */ + +void __pthread_reset_pthread_once(void) +{ + pthread_mutex_init(&once_masterlock, NULL); + pthread_cond_init(&once_finished, NULL); +} diff --git a/linuxthreads/ptfork.c b/linuxthreads/ptfork.c index 1dfa8b6ab71..4cd883fd239 100644 --- a/linuxthreads/ptfork.c +++ b/linuxthreads/ptfork.c @@ -89,6 +89,7 @@ pid_t __fork(void) pid = __libc_fork(); if (pid == 0) { __pthread_reset_main_thread(); + __pthread_reset_pthread_once(); __fresetlockfiles(); pthread_call_handlers(child); } else {