[PATCH v2] libgfortran: Bugfix if not define HAVE_ATOMIC_FETCH_ADD

Jakub Jelinek jakub@redhat.com
Thu Jan 11 12:38:49 GMT 2024


On Thu, Jan 04, 2024 at 08:43:26PM -0500, Lipeng Zhu wrote:
> This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is
> not defined in dec_waiting_unlocked function. As io.h does
> not include async.h, the WRLOCK and RWUNLOCK macros are
> undefined.
> 
> 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.zhu@intel.com>

LGTM.

	Jakub



More information about the Fortran mailing list