Comment 3 for bug 1379905

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

It is totally counter-intuitive

There are HAVE_ATOMIC_BUILTINS and HAVE_ATOMIC_BUILTINS_64 macros'.

MONITOR_ATOMIC_INC is defined as MONITOR_MUTEX_INC for case when HAVE_ATOMIC_BUILTINS_64 is not defined.

Other places do check like:

# if defined(HAVE_ATOMIC_BUILTINS) && UNIV_WORD_SIZE == 8

In Lucid 32-bit HAVE_ATOMIC_BUILTINS is defined, HAVE_ATOMIC_BUILTINS_64 is not defined and MONITOR_ATOMIC_INC is in fact trying to use mutex because it is shortcut for MONITOR_MUTEX_INC in this case.

Fix is to check HAVE_ATOMIC_BUILTINS_64 or HAVE_ATOMIC_BUILTINS and UNIV_WORD_SIZE.