]> sourceware.org Git - valgrind.git/commit
Darwin: remove global variable used in aio_return
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 18 Nov 2023 06:34:00 +0000 (07:34 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 18 Nov 2023 06:34:00 +0000 (07:34 +0100)
commite19b6dc604f99dbe7dc8c3676dce5a4f186c5235
treedd332a672ab2edb8fc5a53bc9c1bd49184a97b58
parent8113cc7f8a96a67c0f295a830a8f24a911996b04
Darwin: remove global variable used in aio_return

This was using a global variable to signify a read success
between pre- and post- aio_return. I don't think that this
was safe. There could be multiple calls to aio_return on
different threads. The global aiocpb_table is safe enough
as the pointers to control block are unique. However if two
threads manipulate was_a_successful_aio_read there's no way
of telling them apart. Rather than trying to make
was_a_successful_aio_read thread safe I did the same as on
FreeBSD and removed post- aio_return and now do everything
in pre- aio_return. No global variable, no thread hazard.
coregrind/m_syswrap/syswrap-darwin.c
This page took 0.02953 seconds and 5 git commands to generate.