]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/mips/sys/tas.h
1 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
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.
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.
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/>. */
27 extern int _test_and_set (int *__p
, int __v
)
28 __THROW
__attribute__ ((__nomips16__
));
30 #ifdef __USE_EXTERN_INLINES
32 # ifndef _EXTERN_INLINE
33 # define _EXTERN_INLINE __extern_inline
36 _EXTERN_INLINE
int __attribute__ ((__nomips16__
))
37 __NTH (_test_and_set (int *__p
, int __v
))
42 ("/* Inline test and set */\n"
44 #if _MIPS_SIM == _ABIO32 && __mips < 2
57 "/* End test and set */"
58 : "=&r" (__r
), "=&r" (__t
), "=m" (*__p
)
59 : "m" (*__p
), "r" (__v
)
65 #endif /* __USE_EXTERN_INLINES */
69 #endif /* sys/tas.h */