aboutsummaryrefslogtreecommitdiff
path: root/bfd/po
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-09-05 19:05:40 -0600
committerTom Tromey <tom@tromey.com>2023-11-07 17:47:16 -0700
commit1185b5b79a12ba67eb60bee3f75babf7a222fde0 (patch)
tree8bec5accb1289ea191ae245815adcbd6e7f0df8d /bfd/po
parentc6d6a048f5a6f422e470c7c4bdb21a0c59d7c8fd (diff)
downloadfsf-binutils-gdb-1185b5b79a12ba67eb60bee3f75babf7a222fde0.zip
fsf-binutils-gdb-1185b5b79a12ba67eb60bee3f75babf7a222fde0.tar.gz
fsf-binutils-gdb-1185b5b79a12ba67eb60bee3f75babf7a222fde0.tar.bz2
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.
Diffstat (limited to 'bfd/po')
-rw-r--r--bfd/po/bfd.pot10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 6c97979..bc428da 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -231,22 +231,22 @@ msgstr ""
msgid "#<invalid error code>"
msgstr ""
-#: bfd.c:1892
+#: bfd.c:2019
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:1905
+#: bfd.c:2032
#, c-format
msgid "BFD %s internal error, aborting at %s:%d in %s\n"
msgstr ""
-#: bfd.c:1910
+#: bfd.c:2037
#, c-format
msgid "BFD %s internal error, aborting at %s:%d\n"
msgstr ""
-#: bfd.c:1912
+#: bfd.c:2039
msgid "Please report this bug.\n"
msgstr ""
@@ -265,7 +265,7 @@ msgstr ""
msgid "warning: writing section `%pA' at huge (ie negative) file offset"
msgstr ""
-#: cache.c:273
+#: cache.c:275
#, c-format
msgid "reopening %pB: %s"
msgstr ""