]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/s390/lowlevellock.h
cab5f4c7a3b8f0e58aec3cd90f3a1ada423a11cb
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / s390 / lowlevellock.h
1 /* Copyright (C) 2003-2015 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19 #ifndef _S390_LOWLEVELLOCK_H
20 #define _S390_LOWLEVELLOCK_H 1
21
22 #include <sysdeps/nptl/lowlevellock.h>
23
24 /* Transactional lock elision definitions. */
25 # ifdef ENABLE_LOCK_ELISION
26 extern int __lll_timedlock_elision
27 (int *futex, short *adapt_count, const struct timespec *timeout, int private)
28 attribute_hidden;
29
30 # define lll_timedlock_elision(futex, adapt_count, timeout, private) \
31 __lll_timedlock_elision(&(futex), &(adapt_count), timeout, private)
32
33 extern int __lll_lock_elision (int *futex, short *adapt_count, int private)
34 attribute_hidden;
35
36 extern int __lll_unlock_elision(int *futex, int private)
37 attribute_hidden;
38
39 extern int __lll_trylock_elision(int *futex, short *adapt_count)
40 attribute_hidden;
41
42 # define lll_lock_elision(futex, adapt_count, private) \
43 __lll_lock_elision (&(futex), &(adapt_count), private)
44 # define lll_unlock_elision(futex, adapt_count, private) \
45 __lll_unlock_elision (&(futex), private)
46 # define lll_trylock_elision(futex, adapt_count) \
47 __lll_trylock_elision(&(futex), &(adapt_count))
48 # endif /* ENABLE_LOCK_ELISION */
49
50 #endif /* lowlevellock.h */