Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Handle _rtld_exit as full entry point sinc...



details:   https://anonhg.NetBSD.org/src/rev/4c525b8e6f24
branches:  trunk
changeset: 763619:4c525b8e6f24
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Mar 27 21:58:50 2011 +0000

description:
Handle _rtld_exit as full entry point since other threads may still be
running at the time.

diffstat:

 libexec/ld.elf_so/rtld.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 71a3b746ec18 -r 4c525b8e6f24 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Sun Mar 27 21:56:57 2011 +0000
+++ b/libexec/ld.elf_so/rtld.c  Sun Mar 27 21:58:50 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.144 2011/03/27 13:15:34 joerg Exp $  */
+/*     $NetBSD: rtld.c,v 1.145 2011/03/27 21:58:50 joerg Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.144 2011/03/27 13:15:34 joerg Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.145 2011/03/27 21:58:50 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -304,7 +304,11 @@
 {
        dbg(("rtld_exit()"));
 
+       _rtld_exclusive_enter();
+
        _rtld_call_fini_functions(1);
+
+       _rtld_exclusive_exit();
 }
 
 /*



Home | Main Index | Thread Index | Old Index