Date: Wed, 21 Jun 2006 20:42:08 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_linker.c link_elf.c link_elf_obj.c Message-ID: <200606212042.k5LKg8vA030033@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2006-06-21 20:42:08 UTC FreeBSD src repository Modified files: sys/kern kern_linker.c link_elf.c link_elf_obj.c Log: Replace the kld_mtx mutex with a kld_sx sx lock and expand it's scope to protect all linker-related data structures including the contents of linker file objects and the any linker class data as well. Considering how rarely the linker is used I just went with the simple solution of single-threading the whole thing rather than expending a lot of effor on something more fine-grained and complex. Giant is still explicitly acquired while registering and deregistering sysctl's as well as in the elf linker class while calling kmupetext(). The rest of the linker runs without Giant unless it has to acquire Giant while loading files from a non-MPSAFE filesystem. Revision Changes Path 1.138 +76 -49 src/sys/kern/kern_linker.c 1.89 +2 -2 src/sys/kern/link_elf.c 1.92 +0 -2 src/sys/kern/link_elf_obj.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606212042.k5LKg8vA030033>