Searched refs:val (Results 1 - 25 of 261) sorted by relevance

1234567891011

/fuchsia/zircon/third_party/ulib/musl/pthread/
H A Dpthread_setconcurrency.c4 int pthread_setconcurrency(int val) { argument
5 if (val < 0)
7 if (val > 0)
H A Dsem_post.c6 int val, waiters; local
8 val = atomic_load(&sem->_s_value);
10 if (val == SEM_VALUE_MAX) {
14 } while (a_cas_shim(&sem->_s_value, val, val + 1 + (val < 0)) != val);
15 if (val < 0 || waiters)
H A Dpthread_rwlock_tryrdlock.c4 int val, cnt; local
6 val = atomic_load(&rw->_rw_lock);
7 cnt = val & 0x7fffffff;
12 } while (a_cas_shim(&rw->_rw_lock, val, val + 1) != val);
H A Dsem_trywait.c5 int val; local
6 while ((val = atomic_load(&sem->_s_value)) > 0) {
7 int new = val - 1 - (val == 1 && atomic_load(&sem->_s_waiters));
8 if (a_cas_shim(&sem->_s_value, val, new) == val)
H A Dpthread_rwlock_unlock.c5 int val, cnt, waiters, new; local
8 val = atomic_load(&rw->_rw_lock);
9 cnt = val & 0x7fffffff;
11 new = (cnt == 0x7fffffff || cnt == 1) ? 0 : val - 1;
12 } while (a_cas_shim(&rw->_rw_lock, val, new) != val);
14 if (!new && (waiters || val < 0))
H A Dsem_getvalue.c6 int val = atomic_load(&sem->_s_value); local
7 *valp = val < 0 ? 0 : val;
/fuchsia/zircon/bootloader/lib/
H A Dinet.c15 uint16_t htons(uint16_t val) { argument
17 return __builtin_bswap16(val);
19 return val;
23 uint16_t ntohs(uint16_t val) { argument
24 return htons(val);
27 uint32_t htonl(uint32_t val) { argument
29 return __builtin_bswap32(val);
31 return val;
35 uint32_t ntohl(uint32_t val) { argument
36 return htonl(val);
[all...]
/fuchsia/zircon/bootloader/include/arpa/
H A Dinet.h7 uint16_t htons(uint16_t val);
8 uint16_t ntohs(uint16_t val);
9 uint32_t htonl(uint32_t val);
10 uint32_t ntohl(uint32_t val);
/fuchsia/zircon/kernel/include/
H A Dpow2.h19 __CONSTEXPR static inline __ALWAYS_INLINE bool ispow2(uint val) argument
21 return ((val - 1) & val) == 0;
24 // Compute log2(|val|), rounded as requested by |ceiling|. We define
26 __CONSTEXPR static inline __ALWAYS_INLINE uint _log2_uint(uint val, bool ceiling) argument
28 if (val == 0)
31 uint log2 = (uint)(sizeof(val) * CHAR_BIT) - 1 - __builtin_clz(val);
33 if (ceiling && val - (1u << log2) > 0) {
40 // Compute floor(log2(|val|)), o
41 log2_uint_floor(uint val) argument
47 log2_uint_ceil(uint val) argument
54 _log2_ulong(ulong val, bool ceiling) argument
69 log2_ulong_floor(ulong val) argument
75 log2_ulong_ceil(ulong val) argument
85 divpow2(uint val, uint divp2) argument
90 modpow2(uint val, uint modp2) argument
95 modpow2_u64(uint64_t val, uint modp2) argument
[all...]
/fuchsia/zircon/system/utest/fuzz-utils/
H A Dstring-map.cpp26 const char* val; local
28 val = map.get("key1");
29 EXPECT_NULL(val);
34 val = map.get("key1");
35 ASSERT_NONNULL(val);
36 EXPECT_STR_EQ(val, "val1");
38 val = map.get("key2");
39 ASSERT_NONNULL(val);
40 EXPECT_STR_EQ(val, "val2");
44 val
59 const char* val; local
94 const char* val; local
[all...]
/fuchsia/zircon/kernel/arch/arm64/
H A Dspinlock.cpp16 unsigned long val = arch_curr_cpu_num() + 1; variable
24 "stxr %w[temp], %[val], [%[lock]];"
27 : [lock] "r"(&lock->value), [val] "r"(val)
32 unsigned long val = arch_curr_cpu_num() + 1; variable
38 "stxr %w[out], %[val], [%[lock]];"
41 : [lock] "r"(&lock->value), [val] "r"(val)
/fuchsia/zircon/kernel/lib/libc/include/
H A Dendian.h36 #define LE64(val) SWAP_64(val)
37 #define LE32(val) SWAP_32(val)
38 #define LE16(val) SWAP_16(val)
39 #define BE64(val) (val)
40 #define BE32(val) (val)
[all...]
/fuchsia/zircon/third_party/ulib/musl/src/locale/
H A Dlocale_map.c21 const struct __locale_map* __get_locale(int cat, const char* val) { argument
30 if (!*val) {
31 ((val = getenv("LC_ALL")) && *val) || ((val = getenv(envvars[cat])) && *val) ||
32 ((val = getenv("LANG")) && *val) || (val = "C.UTF-8");
36 for (n = 0; n < LOCALE_NAME_MAX && val[
[all...]
/fuchsia/zircon/third_party/ulib/ngunwind/src/mi/
H A DGset_fpreg.c29 unw_set_fpreg (unw_cursor_t *cursor, int regnum, unw_fpreg_t val) argument
33 return tdep_access_fpreg (c, regnum, &val, 1);
/fuchsia/zircon/kernel/include/kernel/
H A Datomic.h15 static inline int atomic_swap(volatile int* ptr, int val) { argument
16 return __atomic_exchange_n(ptr, val, __ATOMIC_SEQ_CST);
19 static inline int atomic_add(volatile int* ptr, int val) { argument
20 return __atomic_fetch_add(ptr, val, __ATOMIC_SEQ_CST);
23 static inline int atomic_and(volatile int* ptr, int val) { argument
24 return __atomic_fetch_and(ptr, val, __ATOMIC_SEQ_CST);
27 static inline int atomic_or(volatile int* ptr, int val) { argument
28 return __atomic_fetch_or(ptr, val, __ATOMIC_SEQ_CST);
31 static inline int atomic_xor(volatile int* ptr, int val) { argument
32 return __atomic_fetch_xor(ptr, val, __ATOMIC_SEQ_CS
49 atomic_swap_relaxed(volatile int* ptr, int val) argument
53 atomic_add_relaxed(volatile int* ptr, int val) argument
57 atomic_and_relaxed(volatile int* ptr, int val) argument
61 atomic_or_relaxed(volatile int* ptr, int val) argument
65 atomic_xor_relaxed(volatile int* ptr, int val) argument
82 atomic_add_release(volatile int* ptr, int val) argument
103 atomic_swap_64(volatile int64_t* ptr, int64_t val) argument
107 atomic_add_64(volatile int64_t* ptr, int64_t val) argument
111 atomic_and_64(volatile int64_t* ptr, int64_t val) argument
115 atomic_or_64(volatile int64_t* ptr, int64_t val) argument
119 atomic_xor_64(volatile int64_t* ptr, int64_t val) argument
137 atomic_swap_u64(volatile uint64_t* ptr, uint64_t val) argument
141 atomic_add_u64(volatile uint64_t* ptr, uint64_t val) argument
145 atomic_and_u64(volatile uint64_t* ptr, uint64_t val) argument
149 atomic_or_u64(volatile uint64_t* ptr, uint64_t val) argument
153 atomic_xor_u64(volatile uint64_t* ptr, uint64_t val) argument
183 atomic_add_64_relaxed(volatile int64_t* ptr, int64_t val) argument
187 atomic_add_u64_relaxed(volatile uint64_t* ptr, uint64_t val) argument
[all...]
/fuchsia/zircon/third_party/ulib/ngunwind/include/ngunwind/private/
H A Dremote.h14 unw_word_t val, aligned_addr = *addr & -WSIZE, off = *addr - aligned_addr; local
19 ret = (*a->access_mem) (as, aligned_addr, &val, 0, arg);
22 val >>= 8*off;
24 val >>= 8*(WSIZE - 1 - off);
26 *valp = val & 0xff;
34 unw_word_t val, aligned_addr = *addr & -WSIZE, off = *addr - aligned_addr; local
41 ret = (*a->access_mem) (as, aligned_addr, &val, 0, arg);
44 val >>= 8*off;
46 val >>= 8*(WSIZE - 2 - off);
48 *valp = val
56 unw_word_t val, aligned_addr = *addr & -WSIZE, off = *addr - aligned_addr; local
[all...]
H A Ddwarf_i.h12 #define DWARF_GET_LOC(l) ((l).val)
24 # define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
30 ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
36 dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) argument
52 return (*c->as->acc.access_reg) (c->as, (unw_regnum_t) DWARF_GET_LOC (loc), val,
55 return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
59 *val = DWARF_GET_LOC (loc);
64 dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) argument
78 return (*c->as->acc.access_reg) (c->as, (unw_regnum_t) DWARF_GET_LOC (loc), &val,
81 return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
110 unw_word_t val, aligned_addr = *addr & -sizeof (unw_word_t); local
127 dwarf_readu16(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint16_t *val, void *arg) argument
159 byteswap32(uint32_t val) argument
168 dwarf_readu32(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint32_t *val, void *arg) argument
200 dwarf_readu64(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, uint64_t *val, void *arg) argument
233 dwarf_reads8(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int8_t *val, void *arg) argument
246 dwarf_reads16(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int16_t *val, void *arg) argument
259 dwarf_reads32(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int32_t *val, void *arg) argument
272 dwarf_reads64(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, int64_t *val, void *arg) argument
285 dwarf_readw(unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_word_t *val, void *arg) argument
320 unw_word_t val = 0, shift = 0; local
345 unw_word_t val = 0, shift = 0; local
373 unw_word_t val, initial_addr = *addr; local
[all...]
/fuchsia/zircon/third_party/ulib/ngunwind/src/aarch64/
H A DGinit.c69 access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, argument
74 Debug (16, "mem[%lx] <- %lx\n", addr, *val);
75 *(unw_word_t *) addr = *val;
79 *val = *(unw_word_t *) addr;
80 Debug (16, "mem[%lx] -> %lx\n", addr, *val);
86 access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write, argument
100 *(unw_word_t *) addr = *val;
101 Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
105 *val = *(unw_word_t *) addr;
106 Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
116 access_fpreg(unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val, int write, void *arg) argument
[all...]
H A DGstash_frame.c36 Debug (4, "ip=0x%lx cfa=0x%lx type %d cfa [where=%d val=%ld] cfaoff=%ld"
37 " ra=0x%lx fp [where=%d val=%ld @0x%lx] lr [where=%d val=%ld @0x%lx] "
38 "sp [where=%d val=%ld @0x%lx]\n",
41 rs->reg[DWARF_CFA_REG_COLUMN].val,
42 rs->reg[DWARF_CFA_OFF_COLUMN].val,
44 rs->reg[FP].where, rs->reg[FP].val, DWARF_GET_LOC(d->loc[FP]),
45 rs->reg[LR].where, rs->reg[LR].val, DWARF_GET_LOC(d->loc[LR]),
46 rs->reg[SP].where, rs->reg[SP].val, DWARF_GET_LOC(d->loc[SP]));
56 && (rs->reg[DWARF_CFA_REG_COLUMN].val
[all...]
/fuchsia/zircon/third_party/ulib/ngunwind/src/arm/
H A DGstash_frame.c36 Debug (4, "ip=0x%x cfa=0x%x type %d cfa [where=%d val=%d] cfaoff=%d"
37 " ra=0x%x r7 [where=%d val=%d @0x%x] lr [where=%d val=%d @0x%x] "
38 "sp [where=%d val=%d @0x%x]\n",
41 (int) rs->reg[DWARF_CFA_REG_COLUMN].val,
42 (int) rs->reg[DWARF_CFA_OFF_COLUMN].val,
44 rs->reg[R7].where, (int) rs->reg[R7].val, (int) DWARF_GET_LOC(d->loc[R7]),
45 rs->reg[LR].where, (int) rs->reg[LR].val, (int) DWARF_GET_LOC(d->loc[LR]),
46 rs->reg[SP].where, (int) rs->reg[SP].val, (int) DWARF_GET_LOC(d->loc[SP]));
56 && (rs->reg[DWARF_CFA_REG_COLUMN].val
[all...]
/fuchsia/zircon/system/dev/pci/amlogic-pcie/
H A Daml-pcie.cpp22 uint32_t val = readl(reg); local
23 val &= ~bits;
24 writel(val, reg);
30 uint32_t val = readl(reg); local
31 val |= bits;
32 writel(val, reg);
64 uint32_t val = readl(reg); local
65 val &= ~(mask << shift);
66 writel(val, reg);
68 val
74 uint32_t val; local
124 uint32_t val = readl(reg); local
136 uint32_t val = readl(reg); local
[all...]
/fuchsia/zircon/kernel/arch/arm64/include/arch/
H A Ddefines.h34 #define BM(base, count, val) (((val) & ((1UL << (count)) - 1)) << (base))
36 #define BM(base, count, val) (((val) & ((0x1 << (count)) - 1)) << (base))
/fuchsia/zircon/third_party/ulib/musl/src/time/
H A Dstrftime.c21 int val = (tm->tm_yday + 7U - (tm->tm_wday + 6U) % 7) / 7; local
25 val++;
26 if (!val) {
27 val = 52;
33 val++;
34 } else if (val == 53) {
40 val = 1;
42 return val;
49 long long val; local
79 val
[all...]
/fuchsia/zircon/third_party/uapp/dash/src/
H A Darith_yacc.c137 static intmax_t primary(int token, union yystype *val, int op, int noeval) argument
151 return val->val;
154 return noeval ? val->val : lookupvarint(val->name);
157 *val = yylval;
161 *val = yylval;
162 return -primary(op, val, yylex(), noeval);
164 *val
177 union yystype val; local
204 binop(int token, union yystype *val, int op, int noeval) argument
215 and(int token, union yystype *val, int op, int noeval) argument
232 or(int token, union yystype *val, int op, int noeval) argument
249 cond(int token, union yystype *val, int op, int noeval) argument
273 union yystype val = yylval; local
[all...]
/fuchsia/zircon/kernel/arch/arm64/include/arch/arm64/hypervisor/gic/
H A Del2.h16 extern void arm64_el2_gicv3_write_gich_hcr(uint32_t val);
19 extern void arm64_el2_gicv3_write_gich_vmcr(uint32_t val);
23 extern void arm64_el2_gicv3_write_gich_apr(uint32_t val);
25 extern void arm64_el2_gicv3_write_gich_lr(uint64_t val, uint32_t index);

Completed in 185 milliseconds

1234567891011