On 1/3/24 3:12 AM, Tobias Burnus wrote:
On 22.12.23 03:36, Lipeng Zhu wrote:
This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is
not defined in dec_waiting_unlocked function.
libgfortran/ChangeLog:
* io/io.h (dec_waiting_unlocked): Use
__gthread_rwlock_wrlock/__gthread_rwlock_unlock or
__gthread_mutex_lock/__gthread_mutex_unlock functions
to replace WRLOCK and RWUNLOCK macros.
Signed-off-by: Lipeng Zhu <lipeng....@intel.com>
The change looks good to me + I assume it will work, but have not tested
it myself.
Downside is that it slightly breaks with the abstraction done with all
the macros, but it seems to be the simplest solution.
What is really missing - and should be included in the commit message
(before the ChangeLog block) - is the following information:
As io.h does not include async.h, the WRLOCK and RWUNLOCK macros are
undefined.
---- snip ----
Would it make sense to include or merge async.h into io.h?
Jerry