/* elision-unlock.c: Commit an elided pthread lock.
- Copyright (C) 2015-2017 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
int
__lll_unlock_elision (int *lock, short *adapt_count, int pshared)
{
+#ifndef __SPE__
/* When the lock was free we're in a transaction. */
if (*lock == 0)
__libc_tend (0);
the mutex destruction requirements. */
short __tmp = atomic_load_relaxed (adapt_count);
if (__tmp > 0)
- atomic_store_relaxed (adapt_count, __tmp--);
+ atomic_store_relaxed (adapt_count, __tmp - 1);
lll_unlock ((*lock), pshared);
}
+#else
+ lll_unlock ((*lock), pshared);
+#endif
return 0;
}