mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Remove atomic-machine.h atomic typedefs
Now that memusage.c uses generic types we can remove them.
This commit is contained in:
@@ -19,23 +19,6 @@
|
|||||||
#ifndef _AARCH64_ATOMIC_MACHINE_H
|
#ifndef _AARCH64_ATOMIC_MACHINE_H
|
||||||
#define _AARCH64_ATOMIC_MACHINE_H 1
|
#define _AARCH64_ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 1
|
#define __HAVE_64B_ATOMICS 1
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
||||||
#define ATOMIC_EXCHANGE_USES_CAS 0
|
#define ATOMIC_EXCHANGE_USES_CAS 0
|
||||||
|
@@ -17,31 +17,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 1
|
#define __HAVE_64B_ATOMICS 1
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
@@ -127,7 +102,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
: [__prev] "=&r" (__prev), \
|
: [__prev] "=&r" (__prev), \
|
||||||
[__cmp] "=&r" (__cmp) \
|
[__cmp] "=&r" (__cmp) \
|
||||||
: [__mem] "m" (*(mem)), \
|
: [__mem] "m" (*(mem)), \
|
||||||
[__old] "Ir" ((uint64_t)(atomic32_t)(uint64_t)(old)), \
|
[__old] "Ir" ((uint64_t)(int32_t)(uint64_t)(old)), \
|
||||||
[__new] "Ir" (new) \
|
[__new] "Ir" (new) \
|
||||||
: "memory"); \
|
: "memory"); \
|
||||||
})
|
})
|
||||||
|
@@ -19,18 +19,6 @@
|
|||||||
#ifndef _ARC_BITS_ATOMIC_H
|
#ifndef _ARC_BITS_ATOMIC_H
|
||||||
#define _ARC_BITS_ATOMIC_H 1
|
#define _ARC_BITS_ATOMIC_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
||||||
|
|
||||||
|
@@ -16,23 +16,6 @@
|
|||||||
License along with the GNU C Library. If not, see
|
License along with the GNU C Library. If not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
#define ATOMIC_EXCHANGE_USES_CAS 1
|
#define ATOMIC_EXCHANGE_USES_CAS 1
|
||||||
|
@@ -19,16 +19,6 @@
|
|||||||
#ifndef __CSKY_ATOMIC_H_
|
#ifndef __CSKY_ATOMIC_H_
|
||||||
#define __CSKY_ATOMIC_H_
|
#define __CSKY_ATOMIC_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
||||||
#define ATOMIC_EXCHANGE_USES_CAS 1
|
#define ATOMIC_EXCHANGE_USES_CAS 1
|
||||||
|
@@ -15,34 +15,8 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <ia64intrin.h>
|
#include <ia64intrin.h>
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 1
|
#define __HAVE_64B_ATOMICS 1
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -18,37 +18,6 @@
|
|||||||
#ifndef _ATOMIC_MACHINE_H
|
#ifndef _ATOMIC_MACHINE_H
|
||||||
#define _ATOMIC_MACHINE_H 1
|
#define _ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/* Coldfire has no atomic compare-and-exchange operation, and the
|
|
||||||
kernel provides no userspace atomicity operations. Here we just
|
|
||||||
use generic non-atomic implementations instead. */
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
/* If we have just non-atomic operations, we can as well make them wide. */
|
/* If we have just non-atomic operations, we can as well make them wide. */
|
||||||
#define __HAVE_64B_ATOMICS 1
|
#define __HAVE_64B_ATOMICS 1
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
@@ -15,34 +15,6 @@
|
|||||||
License along with the GNU C Library. If not, see
|
License along with the GNU C Library. If not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 1
|
#define __HAVE_64B_ATOMICS 1
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -16,25 +16,8 @@
|
|||||||
License along with the GNU C Library. If not, see
|
License along with the GNU C Library. If not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -19,25 +19,8 @@
|
|||||||
#ifndef _MIPS_ATOMIC_MACHINE_H
|
#ifndef _MIPS_ATOMIC_MACHINE_H
|
||||||
#define _MIPS_ATOMIC_MACHINE_H 1
|
#define _MIPS_ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <sgidefs.h>
|
#include <sgidefs.h>
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#if _MIPS_SIM == _ABIO32 && __mips < 2
|
#if _MIPS_SIM == _ABIO32 && __mips < 2
|
||||||
#define MIPS_PUSH_MIPS2 ".set mips2\n\t"
|
#define MIPS_PUSH_MIPS2 ".set mips2\n\t"
|
||||||
#else
|
#else
|
||||||
|
@@ -25,23 +25,6 @@
|
|||||||
* as appropriate and which in turn include this file.
|
* as appropriate and which in turn include this file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Powerpc does not have byte and halfword forms of load and reserve and
|
* Powerpc does not have byte and halfword forms of load and reserve and
|
||||||
* store conditional. So for powerpc we stub out the 8- and 16-bit forms.
|
* store conditional. So for powerpc we stub out the 8- and 16-bit forms.
|
||||||
|
@@ -15,33 +15,6 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
/* Activate all C11 atomic builtins.
|
/* Activate all C11 atomic builtins.
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
@@ -19,33 +19,6 @@
|
|||||||
#ifndef _ATOMIC_MACHINE_H
|
#ifndef _ATOMIC_MACHINE_H
|
||||||
#define _ATOMIC_MACHINE_H 1
|
#define _ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#ifdef __arch64__
|
#ifdef __arch64__
|
||||||
# define __HAVE_64B_ATOMICS 1
|
# define __HAVE_64B_ATOMICS 1
|
||||||
#else
|
#else
|
||||||
|
@@ -15,26 +15,9 @@
|
|||||||
License along with the GNU C Library. If not, see
|
License along with the GNU C Library. If not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h> /* Required for type definitions e.g. uint8_t. */
|
|
||||||
|
|
||||||
#ifndef _ATOMIC_MACHINE_H
|
#ifndef _ATOMIC_MACHINE_H
|
||||||
#define _ATOMIC_MACHINE_H 1
|
#define _ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define atomic_full_barrier() __sync_synchronize ()
|
#define atomic_full_barrier() __sync_synchronize ()
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
|
@@ -18,22 +18,11 @@
|
|||||||
#ifndef _ATOMIC_MACHINE_H
|
#ifndef _ATOMIC_MACHINE_H
|
||||||
#define _ATOMIC_MACHINE_H 1
|
#define _ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
/* Coldfire has no atomic compare-and-exchange operation, but the
|
/* Coldfire has no atomic compare-and-exchange operation, but the
|
||||||
kernel provides userspace atomicity operations. Use them. */
|
kernel provides userspace atomicity operations. Use them. */
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -19,18 +19,6 @@
|
|||||||
#ifndef _NIOS2_ATOMIC_MACHINE_H
|
#ifndef _NIOS2_ATOMIC_MACHINE_H
|
||||||
#define _NIOS2_ATOMIC_MACHINE_H 1
|
#define _NIOS2_ATOMIC_MACHINE_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -19,19 +19,6 @@
|
|||||||
#ifndef _LINUX_RISCV_BITS_ATOMIC_H
|
#ifndef _LINUX_RISCV_BITS_ATOMIC_H
|
||||||
#define _LINUX_RISCV_BITS_ATOMIC_H 1
|
#define _LINUX_RISCV_BITS_ATOMIC_H 1
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define atomic_full_barrier() __sync_synchronize ()
|
#define atomic_full_barrier() __sync_synchronize ()
|
||||||
|
|
||||||
#ifdef __riscv_atomic
|
#ifdef __riscv_atomic
|
||||||
|
@@ -16,34 +16,6 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
#define __HAVE_64B_ATOMICS 0
|
#define __HAVE_64B_ATOMICS 0
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
#define USE_ATOMIC_COMPILER_BUILTINS 0
|
||||||
|
|
||||||
|
@@ -23,32 +23,6 @@
|
|||||||
#include <tls.h> /* For tcbhead_t. */
|
#include <tls.h> /* For tcbhead_t. */
|
||||||
#include <libc-pointer-arith.h> /* For cast_to_integer. */
|
#include <libc-pointer-arith.h> /* For cast_to_integer. */
|
||||||
|
|
||||||
typedef int8_t atomic8_t;
|
|
||||||
typedef uint8_t uatomic8_t;
|
|
||||||
typedef int_fast8_t atomic_fast8_t;
|
|
||||||
typedef uint_fast8_t uatomic_fast8_t;
|
|
||||||
|
|
||||||
typedef int16_t atomic16_t;
|
|
||||||
typedef uint16_t uatomic16_t;
|
|
||||||
typedef int_fast16_t atomic_fast16_t;
|
|
||||||
typedef uint_fast16_t uatomic_fast16_t;
|
|
||||||
|
|
||||||
typedef int32_t atomic32_t;
|
|
||||||
typedef uint32_t uatomic32_t;
|
|
||||||
typedef int_fast32_t atomic_fast32_t;
|
|
||||||
typedef uint_fast32_t uatomic_fast32_t;
|
|
||||||
|
|
||||||
typedef int64_t atomic64_t;
|
|
||||||
typedef uint64_t uatomic64_t;
|
|
||||||
typedef int_fast64_t atomic_fast64_t;
|
|
||||||
typedef uint_fast64_t uatomic_fast64_t;
|
|
||||||
|
|
||||||
typedef intptr_t atomicptr_t;
|
|
||||||
typedef uintptr_t uatomicptr_t;
|
|
||||||
typedef intmax_t atomic_max_t;
|
|
||||||
typedef uintmax_t uatomic_max_t;
|
|
||||||
|
|
||||||
|
|
||||||
#define LOCK_PREFIX "lock;"
|
#define LOCK_PREFIX "lock;"
|
||||||
|
|
||||||
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
#define USE_ATOMIC_COMPILER_BUILTINS 1
|
||||||
@@ -119,9 +93,9 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
"lock\n" \
|
"lock\n" \
|
||||||
"0:\tcmpxchgq %q2, %1" \
|
"0:\tcmpxchgq %q2, %1" \
|
||||||
: "=a" (ret), "=m" (*mem) \
|
: "=a" (ret), "=m" (*mem) \
|
||||||
: "q" ((atomic64_t) cast_to_integer (newval)), \
|
: "q" ((int64_t) cast_to_integer (newval)), \
|
||||||
"m" (*mem), \
|
"m" (*mem), \
|
||||||
"0" ((atomic64_t) cast_to_integer (oldval)), \
|
"0" ((int64_t) cast_to_integer (oldval)), \
|
||||||
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
||||||
ret; })
|
ret; })
|
||||||
# define do_exchange_and_add_val_64_acq(pfx, mem, value) 0
|
# define do_exchange_and_add_val_64_acq(pfx, mem, value) 0
|
||||||
@@ -191,7 +165,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
else if (__HAVE_64B_ATOMICS) \
|
else if (__HAVE_64B_ATOMICS) \
|
||||||
__asm __volatile ("xchgq %q0, %1" \
|
__asm __volatile ("xchgq %q0, %1" \
|
||||||
: "=r" (result), "=m" (*mem) \
|
: "=r" (result), "=m" (*mem) \
|
||||||
: "0" ((atomic64_t) cast_to_integer (newvalue)), \
|
: "0" ((int64_t) cast_to_integer (newvalue)), \
|
||||||
"m" (*mem)); \
|
"m" (*mem)); \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
@@ -222,7 +196,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
else if (__HAVE_64B_ATOMICS) \
|
else if (__HAVE_64B_ATOMICS) \
|
||||||
__asm __volatile (lock "xaddq %q0, %1" \
|
__asm __volatile (lock "xaddq %q0, %1" \
|
||||||
: "=r" (__result), "=m" (*mem) \
|
: "=r" (__result), "=m" (*mem) \
|
||||||
: "0" ((atomic64_t) cast_to_integer (__addval)), \
|
: "0" ((int64_t) cast_to_integer (__addval)), \
|
||||||
"m" (*mem), \
|
"m" (*mem), \
|
||||||
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
||||||
else \
|
else \
|
||||||
@@ -264,7 +238,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
else if (__HAVE_64B_ATOMICS) \
|
else if (__HAVE_64B_ATOMICS) \
|
||||||
__asm __volatile (lock "addq %q1, %0" \
|
__asm __volatile (lock "addq %q1, %0" \
|
||||||
: "=m" (*mem) \
|
: "=m" (*mem) \
|
||||||
: "ir" ((atomic64_t) cast_to_integer (value)), \
|
: "ir" ((int64_t) cast_to_integer (value)), \
|
||||||
"m" (*mem), \
|
"m" (*mem), \
|
||||||
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
"i" (offsetof (tcbhead_t, multiple_threads))); \
|
||||||
else \
|
else \
|
||||||
@@ -298,7 +272,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
else if (__HAVE_64B_ATOMICS) \
|
else if (__HAVE_64B_ATOMICS) \
|
||||||
__asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \
|
__asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \
|
||||||
: "=m" (*mem), "=qm" (__result) \
|
: "=m" (*mem), "=qm" (__result) \
|
||||||
: "ir" ((atomic64_t) cast_to_integer (value)), \
|
: "ir" ((int64_t) cast_to_integer (value)), \
|
||||||
"m" (*mem)); \
|
"m" (*mem)); \
|
||||||
else \
|
else \
|
||||||
__atomic_link_error (); \
|
__atomic_link_error (); \
|
||||||
@@ -322,7 +296,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
else if (__HAVE_64B_ATOMICS) \
|
else if (__HAVE_64B_ATOMICS) \
|
||||||
__asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \
|
__asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \
|
||||||
: "=m" (*mem), "=qm" (__result) \
|
: "=m" (*mem), "=qm" (__result) \
|
||||||
: "ir" ((atomic64_t) cast_to_integer (value)), \
|
: "ir" ((int64_t) cast_to_integer (value)), \
|
||||||
"m" (*mem)); \
|
"m" (*mem)); \
|
||||||
else \
|
else \
|
||||||
__atomic_link_error (); \
|
__atomic_link_error (); \
|
||||||
|
Reference in New Issue
Block a user