Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 142) sorted by relevance

123456

/glibc-2.36/misc/
Dtst-atomic.c30 atomic_t mem, expected; in do_test() local
34 mem = 24; in do_test()
35 if (atomic_compare_and_exchange_val_acq (&mem, 35, 24) != 24 in do_test()
36 || mem != 35) in do_test()
42 mem = 12; in do_test()
43 if (atomic_compare_and_exchange_val_acq (&mem, 10, 15) != 12 in do_test()
44 || mem != 12) in do_test()
50 mem = -15; in do_test()
51 if (atomic_compare_and_exchange_val_acq (&mem, -56, -15) != -15 in do_test()
52 || mem != -56) in do_test()
[all …]
/glibc-2.36/include/
Datomic.h54 #define __atomic_val_bysize(pre, post, mem, ...) \ argument
56 __typeof ((__typeof (*(mem))) *(mem)) __atg1_result; \
57 if (sizeof (*mem) == 1) \
58 __atg1_result = pre##_8_##post (mem, __VA_ARGS__); \
59 else if (sizeof (*mem) == 2) \
60 __atg1_result = pre##_16_##post (mem, __VA_ARGS__); \
61 else if (sizeof (*mem) == 4) \
62 __atg1_result = pre##_32_##post (mem, __VA_ARGS__); \
63 else if (sizeof (*mem) == 8) \
64 __atg1_result = pre##_64_##post (mem, __VA_ARGS__); \
[all …]
/glibc-2.36/sysdeps/x86/
Datomic-machine.h49 #define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ argument
50 __sync_val_compare_and_swap (mem, oldval, newval)
51 #define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ argument
52 (! __sync_bool_compare_and_swap (mem, oldval, newval))
55 #define __arch_c_compare_and_exchange_val_8_acq(mem, newval, oldval) \ argument
56 ({ __typeof (*mem) ret; \
61 : "=a" (ret), "=m" (*mem) \
62 : BR_CONSTRAINT (newval), "m" (*mem), "0" (oldval), \
66 #define __arch_c_compare_and_exchange_val_16_acq(mem, newval, oldval) \ argument
67 ({ __typeof (*mem) ret; \
[all …]
/glibc-2.36/sysdeps/powerpc/
Datomic-machine.h32 #define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ argument
35 #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ argument
52 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ argument
54 __typeof (*(mem)) __tmp; \
55 __typeof (mem) __memp = (mem); \
69 #define __arch_compare_and_exchange_val_32_rel(mem, newval, oldval) \ argument
71 __typeof (*(mem)) __tmp; \
72 __typeof (mem) __memp = (mem); \
86 #define __arch_atomic_exchange_32_acq(mem, value) \ argument
88 __typeof (*mem) __val; \
[all …]
/glibc-2.36/sysdeps/microblaze/
Datomic-machine.h30 #define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ argument
33 #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ argument
36 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ argument
38 __typeof (*(mem)) __tmp; \
39 __typeof (mem) __memp = (mem); \
62 #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
63 (abort (), (__typeof (*mem)) 0)
65 #define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ argument
67 __typeof (*(mem)) __result; \
68 if (sizeof (*mem) == 4) \
[all …]
/glibc-2.36/sysdeps/m68k/m680x0/m68020/
Datomic-machine.h24 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ argument
25 ({ __typeof (*(mem)) __ret; \
27 : "=d" (__ret), "+m" (*(mem)) \
31 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ argument
32 ({ __typeof (*(mem)) __ret; \
34 : "=d" (__ret), "+m" (*(mem)) \
38 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ argument
39 ({ __typeof (*(mem)) __ret; \
41 : "=d" (__ret), "+m" (*(mem)) \
45 # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
[all …]
/glibc-2.36/sysdeps/unix/sysv/linux/riscv/
Datomic-machine.h33 # define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
35 typeof (*mem) __oldval = (oldval); \
36 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
40 # define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
42 typeof (*mem) __oldval = (oldval); \
43 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
47 # define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
49 typeof (*mem) __oldval = (oldval); \
50 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
54 # define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ argument
[all …]
/glibc-2.36/sysdeps/unix/sysv/linux/sh/
Datomic-machine.h45 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ argument
46 ({ __typeof (*(mem)) __result; \
57 : "=&r" (__result) : "u" (mem), "u" (newval), "u" (oldval) \
61 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ argument
62 ({ __typeof (*(mem)) __result; \
74 : "=&r" (__result) : "u" (mem), "u" (newval), "u" (oldval) \
78 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ argument
79 ({ __typeof (*(mem)) __result; \
90 : "=&r" (__result) : "u" (mem), "u" (newval), "u" (oldval) \
99 # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
[all …]
Dlowlevel-atomic.h26 #define INC(mem, reg) \
31 98: mov.l mem, reg; \
33 mov.l reg, mem; \
36 #define DEC(mem, reg) \
41 98: mov.l mem, reg; \
43 mov.l reg, mem; \
46 #define XADD(reg, mem, old, tmp) \
52 98: mov.l mem, old; \
55 mov.l tmp, mem; \
58 #define XCHG(reg, mem, old) \
[all …]
/glibc-2.36/sysdeps/s390/
Datomic-machine.h50 #define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ argument
51 ({ __atomic_check_size((mem)); \
52 typeof ((__typeof (*(mem))) *(mem)) __atg1_oldval = (oldval); \
53 __atomic_compare_exchange_n (mem, (void *) &__atg1_oldval, \
57 #define atomic_compare_and_exchange_val_rel(mem, newval, oldval) \ argument
58 ({ __atomic_check_size((mem)); \
59 typeof ((__typeof (*(mem))) *(mem)) __atg1_2_oldval = (oldval); \
60 __atomic_compare_exchange_n (mem, (void *) &__atg1_2_oldval, \
67 #define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ argument
68 ({ __atomic_check_size((mem)); \
[all …]
/glibc-2.36/sysdeps/powerpc/powerpc64/
Datomic-machine.h45 #define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \ argument
56 : "b" (mem), "1" (oldval), "r" (newval) \
66 #define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ argument
77 : "b" (mem), "r" (oldval), "r" (newval) \
82 #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
84 __typeof (*(mem)) __tmp; \
85 __typeof (mem) __memp = (mem); \
99 #define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \ argument
101 __typeof (*(mem)) __tmp; \
102 __typeof (mem) __memp = (mem); \
[all …]
/glibc-2.36/sysdeps/aarch64/
Datomic-machine.h29 # define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
31 typeof (*mem) __oldval = (oldval); \
32 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
36 # define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
38 typeof (*mem) __oldval = (oldval); \
39 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
43 # define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
45 typeof (*mem) __oldval = (oldval); \
46 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
50 # define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ argument
[all …]
/glibc-2.36/sysdeps/unix/sysv/linux/loongarch/
Datomic-machine.h31 #define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
33 typeof (*mem) __oldval = (oldval); \
34 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, model, \
38 #define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
40 typeof (*mem) __oldval = (oldval); \
41 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, model, \
45 #define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
47 typeof (*mem) __oldval = (oldval); \
48 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, model, \
52 #define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ argument
[all …]
/glibc-2.36/sysdeps/mips/
Datomic-machine.h58 #define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
61 #define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
64 #define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
66 typeof (*mem) __oldval = (oldval); \
67 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
71 #define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \ argument
72 (abort (), (typeof(*mem)) 0)
74 #define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \ argument
75 (abort (), (typeof(*mem)) 0)
77 #define __arch_compare_and_exchange_val_32_int(mem, newval, oldval, model) \ argument
[all …]
/glibc-2.36/sysdeps/alpha/
Datomic-machine.h34 #define __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2) \ argument
56 : [__addr8] "r" (mem), \
62 #define __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2) \ argument
84 : [__addr16] "r" (mem), \
90 #define __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2) \ argument
104 : [__mem] "m" (*(mem)), \
110 #define __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2) \ argument
124 : [__mem] "m" (*(mem)), \
132 #define __arch_compare_and_exchange_bool_8_int(mem, new, old, mb1, mb2) \ argument
134 __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \
[all …]
/glibc-2.36/sysdeps/arm/
Datomic-machine.h42 # define atomic_exchange_acq(mem, value) \ argument
43 __atomic_val_bysize (__arch_exchange, int, mem, value, __ATOMIC_ACQUIRE)
45 # define atomic_exchange_rel(mem, value) \ argument
46 __atomic_val_bysize (__arch_exchange, int, mem, value, __ATOMIC_RELEASE)
50 # define __arch_exchange_8_int(mem, newval, model) \ argument
51 (__arm_link_error (), (typeof (*mem)) 0)
53 # define __arch_exchange_16_int(mem, newval, model) \ argument
54 (__arm_link_error (), (typeof (*mem)) 0)
56 # define __arch_exchange_32_int(mem, newval, model) \ argument
57 __atomic_exchange_n (mem, newval, model)
[all …]
/glibc-2.36/sysdeps/ia64/
Datomic-machine.h27 #define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ argument
30 #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ argument
33 #define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \ argument
34 (!__sync_bool_compare_and_swap ((mem), (int) (long) (oldval), \
37 #define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ argument
38 (!__sync_bool_compare_and_swap ((mem), (long) (oldval), \
41 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ argument
42 (abort (), (__typeof (*mem)) 0)
44 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ argument
45 (abort (), (__typeof (*mem)) 0)
[all …]
/glibc-2.36/sysdeps/powerpc/powerpc32/
Datomic-machine.h45 #define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \ argument
56 : "b" (mem), "r" (oldval), "r" (newval) \
64 #define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ argument
67 #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
68 (abort (), (__typeof (*mem)) 0)
70 #define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \ argument
71 (abort (), (__typeof (*mem)) 0)
73 #define __arch_atomic_exchange_64_acq(mem, value) \ argument
74 ({ abort (); (*mem) = (value); })
76 #define __arch_atomic_exchange_64_rel(mem, value) \ argument
[all …]
/glibc-2.36/sysdeps/unix/sysv/linux/hppa/
Datomic-machine.h30 #define __atomic_check_size_ls(mem) \ argument
31 if ((sizeof (*mem) != 1) && (sizeof (*mem) != 2) && sizeof (*mem) != 4) \
34 #define atomic_load_relaxed(mem) \ argument
35 ({ __atomic_check_size_ls((mem)); \
36 __atomic_load_n ((mem), __ATOMIC_RELAXED); })
37 #define atomic_load_acquire(mem) \ argument
38 ({ __atomic_check_size_ls((mem)); \
39 __atomic_load_n ((mem), __ATOMIC_ACQUIRE); })
41 #define atomic_store_relaxed(mem, val) \ argument
43 __atomic_check_size_ls((mem)); \
[all …]
/glibc-2.36/sysdeps/or1k/
Datomic-machine.h28 #define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
31 #define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
34 #define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
36 typeof (*mem) __oldval = (oldval); \
37 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
41 #define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ argument
44 #define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \ argument
45 (abort (), (__typeof (*mem)) 0)
47 #define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \ argument
48 (abort (), (__typeof (*mem)) 0)
[all …]
/glibc-2.36/sysdeps/csky/
Datomic-machine.h26 #define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ argument
29 #define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ argument
32 #define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ argument
34 typeof (*mem) __oldval = (oldval); \
35 !__atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
39 #define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ argument
42 #define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \ argument
43 (abort (), (__typeof (*mem)) 0)
45 #define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \ argument
46 (abort (), (__typeof (*mem)) 0)
[all …]
/glibc-2.36/posix/
Dtst-regex.c43 static char *mem; variable
50 static int run_test (const char *expr, const char *mem, size_t memlen,
52 static int run_test_backwards (const char *expr, const char *mem,
80 mem = (char *) malloc (memlen + 1); in do_test()
81 if (mem == NULL) in do_test()
84 if ((size_t) read (fd, mem, memlen) != memlen) in do_test()
86 mem[memlen] = '\0'; in do_test()
101 inmem = mem; in do_test()
138 free (mem); in do_test()
159 result |= run_test (expr, mem, memlen, 0, expected); in test_expr()
[all …]
/glibc-2.36/sysdeps/arc/
Datomic-machine.h29 #define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ argument
31 #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ argument
33 #define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ argument
36 #define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \ argument
37 (abort (), (__typeof (*mem)) 0)
38 #define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \ argument
39 (abort (), (__typeof (*mem)) 0)
40 #define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \ argument
41 (abort (), (__typeof (*mem)) 0)
43 #define __arch_compare_and_exchange_val_32_int(mem, newval, oldval, model) \ argument
[all …]
/glibc-2.36/sysdeps/unix/sysv/linux/nios2/
Datomic-machine.h28 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ argument
29 (abort (), (__typeof (*mem)) 0)
30 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ argument
31 (abort (), (__typeof (*mem)) 0)
32 #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ argument
33 (abort (), (__typeof (*mem)) 0)
35 #define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ argument
37 #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ argument
39 #define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ argument
42 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ argument
[all …]
/glibc-2.36/support/
Dsupport_format_dns_packet.c109 struct xmemstream mem; in support_format_dns_packet() local
110 xopen_memstream (&mem); in support_format_dns_packet()
125 fprintf (mem.out, "error: could not parse DNS header\n"); in support_format_dns_packet()
130 fprintf (mem.out, "error: question count is %d, not 1\n", qdcount); in support_format_dns_packet()
136 fprintf (mem.out, "error: malformed QNAME\n"); in support_format_dns_packet()
144 fprintf (mem.out, "error: malformed question\n"); in support_format_dns_packet()
149 fprintf (mem.out, "error: unsupported QTYPE %d\n", qtype); in support_format_dns_packet()
153 fprintf (mem.out, "name: %s\n", qname.name); in support_format_dns_packet()
160 fprintf (mem.out, "error: malformed record name\n"); in support_format_dns_packet()
174 fprintf (mem.out, "error: malformed record header\n"); in support_format_dns_packet()
[all …]

123456