cvs commit: src/sys/kern kern_linker.c link_elf.c link_elf_obj.c
John Baldwin
jhb at FreeBSD.org
Wed Jun 21 20:42:09 UTC 2006
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
More information about the cvs-src
mailing list