summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/nptl/elide.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/nptl/elide.h')
-rw-r--r--sysdeps/powerpc/nptl/elide.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/sysdeps/powerpc/nptl/elide.h b/sysdeps/powerpc/nptl/elide.h
index 77bd82ecba..f26bf3d382 100644
--- a/sysdeps/powerpc/nptl/elide.h
+++ b/sysdeps/powerpc/nptl/elide.h
@@ -1,5 +1,5 @@
/* elide.h: Generic lock elision support for powerpc.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
@@ -19,7 +19,6 @@
#ifndef ELIDE_PPC_H
# define ELIDE_PPC_H
-#ifdef ENABLE_LOCK_ELISION
# include <htm.h>
# include <elision-conf.h>
@@ -102,6 +101,9 @@ __elide_unlock (int is_lock_free)
{
if (is_lock_free)
{
+ /* This code is expected to crash when trying to unlock a lock not
+ held by this thread. More information is available in the
+ __pthread_rwlock_unlock() implementation. */
__libc_tend (0);
return true;
}
@@ -111,12 +113,4 @@ __elide_unlock (int is_lock_free)
# define ELIDE_UNLOCK(is_lock_free) \
__elide_unlock (is_lock_free)
-# else
-
-# define ELIDE_LOCK(adapt_count, is_lock_free) 0
-# define ELIDE_TRYLOCK(adapt_count, is_lock_free, write) 0
-# define ELIDE_UNLOCK(is_lock_free) 0
-
-#endif /* ENABLE_LOCK_ELISION */
-
#endif