diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2025-05-12 15:09:43 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2025-05-23 11:12:53 -0400 |
commit | e82c588969ab1542d7fb32f675e190897e28b64d (patch) | |
tree | 002463e9d6b278927f6dd599f226dc711b228865 /gdb/make-init-c | |
parent | 8d13d83aba4a103959b127cbb5666e28667ac338 (diff) | |
download | binutils-e82c588969ab1542d7fb32f675e190897e28b64d.zip binutils-e82c588969ab1542d7fb32f675e190897e28b64d.tar.gz binutils-e82c588969ab1542d7fb32f675e190897e28b64d.tar.bz2 |
gdb/dwarf: allocate dwo_unit with new
The following patch reduces the duration where the dwo_lock mutex is
taken. One operation that is not thread safe is the allocation on
dwo_units on the per_bfd obstack:
dwo_unit *dwo_unit = OBSTACK_ZALLOC (&per_bfd->obstack, struct dwo_unit);
We could take the lock around this allocation, but I think it's just
easier to avoid the problem by having the dwo_unit objects allocated
with "new".
Change-Id: Ida04f905cb7941a8826e6078ed25dbcf57674090
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/make-init-c')
0 files changed, 0 insertions, 0 deletions