binutils-gdb/bfd/doc
Tom Tromey 1185b5b79a Add minimal thread-safety to BFD
This patch provides some minimal thread-safety to BFD.

The BFD client can request thread-safety by providing a lock and
unlock function.  The globals used during BFD creation (e.g.,
bfd_id_counter) are then locked, and the file descriptor cache is also
locked.  A function to clean up any thread-local data is now provided
for BFD clients.

	* bfd-in2.h: Regenerate.
	* bfd.c (lock_fn, unlock_fn): New globals.
	(bfd_thread_init, bfd_thread_cleanup, bfd_lock, bfd_unlock): New
	functions.
	* cache.c (bfd_cache_lookup_worker): Use _bfd_open_file_unlocked.
	(cache_btell, cache_bseek, cache_bread, cache_bwrite): Lock
	and unlock.
	(cache_bclose): Add comment.
	(cache_bflush, cache_bstat, cache_bmmap): Lock and unlock.
	(_bfd_cache_init_unlocked): New function.
	(bfd_cache_init): Use it.  Lock and unlock.
	(_bfd_cache_close_unlocked): New function.
	(bfd_cache_close, bfd_cache_close_all): Use it.  Lock and unlock.
	(_bfd_open_file_unlocked): New function.
	(bfd_open_file): Use it.  Lock and unlock.
	* doc/bfd.texi (BFD front end): Add Threading menu item.
	* libbfd.h: Regenerate.
	* opncls.c (_bfd_new_bfd): Lock and unlock.
	* po/bfd.pot: Regenerate.
2023-11-07 17:47:16 -07:00
..
bfd.texi Add minimal thread-safety to BFD 2023-11-07 17:47:16 -07:00
bfdint.texi Rename bfd_bread and bfd_bwrite 2023-08-09 08:48:09 +09:30
bfdsumm.texi
ChangeLog-0415
ChangeLog-9103
chew.c bfd-in2.h BFD_RELOC_* comments 2023-10-23 10:02:53 +10:30
doc.str Generated docs and include files 2023-05-03 15:00:05 +09:30
fdl.texi
header.sed
local.mk PR30806, CPPFLAGS are missing for bfd/chew, syslex_wrap and sysinfo 2023-09-01 09:18:05 +09:30
makefile.vms
proto.str bfd-in2.h BFD_RELOC_* comments 2023-10-23 10:02:53 +10:30
webassembly.texi Revert "Simplify @node use in BFD documentation" 2023-08-31 07:27:01 -06:00