gbitlock.c: replace remaining 'asm' with '__asm__'

Commit 2330f7e65ee22e42016d28c26f554fcfe9518ed5 changed 'asm' to '__asm__' in
g_bit_lock and g_bit_trylock.

Replace 'asm' with '__asm__' in the remaining functions.

Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2344
This commit is contained in:
Aleksandr Mezin 2021-03-04 04:39:27 +06:00
parent 14c9fc79ac
commit d18bdef42d

View File

@ -322,7 +322,7 @@ g_bit_unlock (volatile gint *address,
gint lock_bit)
{
#ifdef USE_ASM_GOTO
asm volatile ("lock btr %1, (%0)"
__asm__ volatile ("lock btr %1, (%0)"
: /* no output */
: "r" (address), "r" (lock_bit)
: "cc", "memory");
@ -405,7 +405,7 @@ void
{
#ifdef USE_ASM_GOTO
retry:
asm volatile goto ("lock bts %1, (%0)\n"
__asm__ volatile goto ("lock bts %1, (%0)\n"
"jc %l[contended]"
: /* no output */
: "r" (address), "r" ((gsize) lock_bit)
@ -477,7 +477,7 @@ gboolean
#ifdef USE_ASM_GOTO
gboolean result;
asm volatile ("lock bts %2, (%1)\n"
__asm__ volatile ("lock bts %2, (%1)\n"
"setnc %%al\n"
"movzx %%al, %0"
: "=r" (result)
@ -520,7 +520,7 @@ void
{
#ifdef USE_ASM_GOTO
asm volatile ("lock btr %1, (%0)"
__asm__ volatile ("lock btr %1, (%0)"
: /* no output */
: "r" (address), "r" ((gsize) lock_bit)
: "cc", "memory");