From 0df23e4bd549257be378a9ec58c75a1fc581b2f1 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Thu, 8 Aug 2002 15:53:23 +0000 Subject: Don't acquire the writer lock in rtld_exit when clearing the shared objects' reference counts. This function is called by the atexit mechanism at program shutdown. I don't think the locking is necessary here. It caused OpenOffice builds to hang more often than not. Credit to Martin Blapp and Matt Dillon for helping to diagnose this problem and for testing the fix. --- libexec/rtld-elf/rtld.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libexec') diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8f3f4d42b675..a007ff5c1d1b 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1460,11 +1460,9 @@ rtld_exit(void) Obj_Entry *obj; dbg("rtld_exit()"); - wlock_acquire(); /* Clear all the reference counts so the fini functions will be called. */ for (obj = obj_list; obj != NULL; obj = obj->next) obj->refcount = 0; - wlock_release(); objlist_call_fini(&list_fini); /* No need to remove the items from the list, since we are exiting. */ } -- cgit v1.3