summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/nptl/elide.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:03:01 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:03:01 +0000
commit14970231a38310b9561052a67b617138eeaad300 (patch)
tree35c201a651afa5d5e4fff241280081b3f88b9c2c /sysdeps/powerpc/nptl/elide.h
parentf08c7420b5e8b017a1a47b880a62b15bdc588f4d (diff)
parent25ead03a3712d57df2208fe82f3d316eb8faeaf6 (diff)
Merge commit 'refs/top-bases/t/extern_inline' into t/extern_inline
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