/kernel/linux/linux-5.10/arch/sh/include/asm/ |
H A D | bitops-cas.h | 5 static inline unsigned __bo_cas(volatile unsigned *p, unsigned old, unsigned new) in __bo_cas() argument 9 : "r"(old), "z"(p) in __bo_cas() 16 unsigned mask, old; in set_bit() local 22 do old = *a; in set_bit() 23 while (__bo_cas(a, old, old|mask) != old); in set_bit() 28 unsigned mask, old; in clear_bit() local 34 do old = *a; in clear_bit() 35 while (__bo_cas(a, old, ol in clear_bit() 40 unsigned mask, old; change_bit() local 52 unsigned mask, old; test_and_set_bit() local 66 unsigned mask, old; test_and_clear_bit() local 80 unsigned mask, old; test_and_change_bit() local [all...] |
H A D | spinlock-cas.h | 13 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) in __sl_cas() argument 17 : "r"(old), "z"(p) in __sl_cas() 54 unsigned old; in arch_read_lock() local 55 do old = rw->lock; in arch_read_lock() 56 while (!old || __sl_cas(&rw->lock, old, old-1) != old); in arch_read_lock() 61 unsigned old; in arch_read_unlock() local 62 do old in arch_read_unlock() 78 unsigned old; arch_read_trylock() local [all...] |
/kernel/linux/linux-6.6/arch/sh/include/asm/ |
H A D | bitops-cas.h | 5 static inline unsigned __bo_cas(volatile unsigned *p, unsigned old, unsigned new) in __bo_cas() argument 9 : "r"(old), "z"(p) in __bo_cas() 16 unsigned mask, old; in set_bit() local 22 do old = *a; in set_bit() 23 while (__bo_cas(a, old, old|mask) != old); in set_bit() 28 unsigned mask, old; in clear_bit() local 34 do old = *a; in clear_bit() 35 while (__bo_cas(a, old, ol in clear_bit() 40 unsigned mask, old; change_bit() local 52 unsigned mask, old; test_and_set_bit() local 66 unsigned mask, old; test_and_clear_bit() local 80 unsigned mask, old; test_and_change_bit() local [all...] |
H A D | spinlock-cas.h | 13 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) in __sl_cas() argument 17 : "r"(old), "z"(p) in __sl_cas() 54 unsigned old; in arch_read_lock() local 55 do old = rw->lock; in arch_read_lock() 56 while (!old || __sl_cas(&rw->lock, old, old-1) != old); in arch_read_lock() 61 unsigned old; in arch_read_unlock() local 62 do old in arch_read_unlock() 78 unsigned old; arch_read_trylock() local [all...] |
/third_party/musl/porting/liteos_a/kernel/src/internal/ |
H A D | atomic.h | 22 int old; in a_cas() local 24 do old = a_ll(p); in a_cas() 25 while (old==t && !a_sc(p, s)); in a_cas() 27 return old; in a_cas() 35 int old; in a_swap() local 37 do old = a_ll(p); in a_swap() 40 return old; in a_swap() 48 int old; in a_fetch_add() local 50 do old = a_ll(p); in a_fetch_add() 51 while (!a_sc(p, (unsigned)old in a_fetch_add() 61 int old; a_fetch_and() local 74 int old; a_fetch_or() local 91 void *old; a_cas_p() local 110 int old; a_swap() local 121 int old; a_fetch_add() local 132 int old; a_fetch_and() local 142 int old; a_fetch_or() local [all...] |
/third_party/musl/porting/liteos_m/user/src/internal/ |
H A D | atomic.h | 22 int old; in a_cas() local 24 do old = a_ll(p); in a_cas() 25 while (old==t && !a_sc(p, s)); in a_cas() 27 return old; in a_cas() 35 int old; in a_swap() local 37 do old = a_ll(p); in a_swap() 40 return old; in a_swap() 48 int old; in a_fetch_add() local 50 do old = a_ll(p); in a_fetch_add() 51 while (!a_sc(p, (unsigned)old in a_fetch_add() 61 int old; a_fetch_and() local 74 int old; a_fetch_or() local 91 void *old; a_cas_p() local 110 int old; a_swap() local 121 int old; a_fetch_add() local 132 int old; a_fetch_and() local 142 int old; a_fetch_or() local [all...] |
/third_party/musl/porting/liteos_m/kernel/src/internal/ |
H A D | atomic.h | 22 int old; in a_cas() local 24 do old = a_ll(p); in a_cas() 25 while (old==t && !a_sc(p, s)); in a_cas() 27 return old; in a_cas() 35 int old; in a_swap() local 37 do old = a_ll(p); in a_swap() 40 return old; in a_swap() 48 int old; in a_fetch_add() local 50 do old = a_ll(p); in a_fetch_add() 51 while (!a_sc(p, (unsigned)old in a_fetch_add() 61 int old; a_fetch_and() local 74 int old; a_fetch_or() local 91 void *old; a_cas_p() local 110 int old; a_swap() local 121 int old; a_fetch_add() local 132 int old; a_fetch_and() local 142 int old; a_fetch_or() local [all...] |
/third_party/musl/porting/uniproton/kernel/src/internal/ |
H A D | atomic.h | 22 int old; in a_cas() local 24 do old = a_ll(p); in a_cas() 25 while (old==t && !a_sc(p, s)); in a_cas() 27 return old; in a_cas() 35 int old; in a_swap() local 37 do old = a_ll(p); in a_swap() 40 return old; in a_swap() 48 int old; in a_fetch_add() local 50 do old = a_ll(p); in a_fetch_add() 51 while (!a_sc(p, (unsigned)old in a_fetch_add() 61 int old; a_fetch_and() local 74 int old; a_fetch_or() local 91 void *old; a_cas_p() local 110 int old; a_swap() local 121 int old; a_fetch_add() local 132 int old; a_fetch_and() local 142 int old; a_fetch_or() local [all...] |
/third_party/musl/src/internal/ |
H A D | atomic.h | 22 int old; in a_cas() local 24 do old = a_ll(p); in a_cas() 25 while (old==t && !a_sc(p, s)); in a_cas() 27 return old; in a_cas() 35 int old; in a_swap() local 37 do old = a_ll(p); in a_swap() 40 return old; in a_swap() 48 int old; in a_fetch_add() local 50 do old = a_ll(p); in a_fetch_add() 51 while (!a_sc(p, (unsigned)old in a_fetch_add() 61 int old; a_fetch_and() local 74 int old; a_fetch_or() local 91 void *old; a_cas_p() local 110 int old; a_swap() local 121 int old; a_fetch_add() local 132 int old; a_fetch_and() local 142 int old; a_fetch_or() local [all...] |
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
H A D | bitops.h | 42 __u32 bit, old, new; in set_bit() local 50 old = *m; in set_bit() 51 new = old | bit; in set_bit() 52 } while (cmpxchg_acq(m, old, new) != old); in set_bit() 83 __u32 mask, old, new; in clear_bit() local 91 old = *m; in clear_bit() 92 new = old & mask; in clear_bit() 93 } while (cmpxchg_acq(m, old, new) != old); in clear_bit() 107 __u32 mask, old, new; clear_bit_unlock() local 164 __u32 bit, old, new; change_bit() local 203 __u32 bit, old, new; test_and_set_bit() local 257 __u32 mask, old, new; test_and_clear_bit() local 302 __u32 bit, old, new; test_and_change_bit() local 326 __u32 old, bit = (1 << (nr & 31)); __test_and_change_bit() local [all...] |
/kernel/linux/linux-6.6/arch/ia64/include/asm/ |
H A D | bitops.h | 42 __u32 bit, old, new; in set_bit() local 50 old = *m; in set_bit() 51 new = old | bit; in set_bit() 52 } while (cmpxchg_acq(m, old, new) != old); in set_bit() 83 __u32 mask, old, new; in clear_bit() local 91 old = *m; in clear_bit() 92 new = old & mask; in clear_bit() 93 } while (cmpxchg_acq(m, old, new) != old); in clear_bit() 107 __u32 mask, old, new; clear_bit_unlock() local 164 __u32 bit, old, new; change_bit() local 203 __u32 bit, old, new; test_and_set_bit() local 257 __u32 mask, old, new; test_and_clear_bit() local 302 __u32 bit, old, new; test_and_change_bit() local 326 __u32 old, bit = (1 << (nr & 31)); arch___test_and_change_bit() local [all...] |
/kernel/linux/linux-6.6/arch/s390/include/asm/ |
H A D | atomic_ops.h | 50 op_type old; \ 53 op_string " %[old],%[val],%[ptr]\n" \ 55 : [old] "=d" (old), [ptr] "+QS" (*ptr) \ 57 return old; \ 101 int old, new; \ 104 "0: lr %[new],%[old]\n" \ 106 " cs %[old],%[new],%[ptr]\n" \ 108 : [old] "=d" (old), [ne 157 __atomic_cmpxchg(int *ptr, int old, int new) __atomic_cmpxchg() argument 167 __atomic_cmpxchg_bool(int *ptr, int old, int new) __atomic_cmpxchg_bool() argument 179 __atomic64_cmpxchg(long *ptr, long old, long new) __atomic64_cmpxchg() argument 189 __atomic64_cmpxchg_bool(long *ptr, long old, long new) __atomic64_cmpxchg_bool() argument [all...] |
H A D | cmpxchg.h | 20 unsigned long old; in __arch_xchg() local 34 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg() 37 return old >> shift; in __arch_xchg() 48 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg() 51 return old >> shift; in __arch_xchg() 57 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg() 60 return old; in __arch_xchg() 66 : "=&d" (old), "+QS" (*(long *) address) in __arch_xchg() 69 return old; in __arch_xchg() 88 unsigned long old, in __cmpxchg() 87 __cmpxchg(unsigned long address, unsigned long old, unsigned long new, int size) __cmpxchg() argument 195 arch_cmpxchg128(volatile u128 *ptr, u128 old, u128 new) arch_cmpxchg128() argument [all...] |
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
H A D | cmpxchg.h | 42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ 49 old <<= bitoff; \ 67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \ 202 * Compare and exchange - if *p == old, set it to new, 203 * and return the old value of *p. 216 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument 231 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32() 238 __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, in __cmpxchg_u32_local() argument 252 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local() 259 __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigne argument 286 __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new) __cmpxchg_u32_acquire() argument 308 __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) __cmpxchg_u64() argument 330 __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, unsigned long new) __cmpxchg_u64_local() argument 351 __cmpxchg_u64_relaxed(u64 *p, unsigned long old, unsigned long new) __cmpxchg_u64_relaxed() argument 370 __cmpxchg_u64_acquire(u64 *p, unsigned long old, unsigned long new) __cmpxchg_u64_acquire() argument 392 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg() argument 412 __cmpxchg_local(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_local() argument 432 __cmpxchg_relaxed(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_relaxed() argument 452 __cmpxchg_acquire(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_acquire() argument [all...] |
/third_party/skia/third_party/externals/imgui/backends/ |
H A D | imgui_impl_dx10.cpp | 24 // 2018-06-08: Misc: Extracted imgui_impl_dx10.cpp/.h away from the old combined DX10+Win32 example. 213 BACKUP_DX10_STATE old = {}; in ImGui_ImplDX10_RenderDrawData() local 214 old.ScissorRectsCount = old.ViewportsCount = D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE; in ImGui_ImplDX10_RenderDrawData() 215 ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects); in ImGui_ImplDX10_RenderDrawData() 216 ctx->RSGetViewports(&old.ViewportsCount, old.Viewports); in ImGui_ImplDX10_RenderDrawData() 217 ctx->RSGetState(&old.RS); in ImGui_ImplDX10_RenderDrawData() 218 ctx->OMGetBlendState(&old in ImGui_ImplDX10_RenderDrawData() [all...] |
H A D | imgui_impl_dx11.cpp | 26 // 2018-06-08: Misc: Extracted imgui_impl_dx11.cpp/.h away from the old combined DX11+Win32 example. 221 BACKUP_DX11_STATE old = {}; in ImGui_ImplDX11_RenderDrawData() local 222 old.ScissorRectsCount = old.ViewportsCount = D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE; in ImGui_ImplDX11_RenderDrawData() 223 ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects); in ImGui_ImplDX11_RenderDrawData() 224 ctx->RSGetViewports(&old.ViewportsCount, old.Viewports); in ImGui_ImplDX11_RenderDrawData() 225 ctx->RSGetState(&old.RS); in ImGui_ImplDX11_RenderDrawData() 226 ctx->OMGetBlendState(&old in ImGui_ImplDX11_RenderDrawData() [all...] |
/third_party/python/Include/internal/ |
H A D | pycore_atomic.h | 295 __int64 old; in _Py_atomic_load_64bit_impl() local 300 old = *value; in _Py_atomic_load_64bit_impl() 301 } while(_InterlockedCompareExchange64_HLEAcquire((volatile __int64*)value, old, old) != old); in _Py_atomic_load_64bit_impl() 307 old = *value; in _Py_atomic_load_64bit_impl() 308 } while(_InterlockedCompareExchange64_HLERelease((volatile __int64*)value, old, old) != old); in _Py_atomic_load_64bit_impl() 312 old in _Py_atomic_load_64bit_impl() 333 long old; _Py_atomic_load_32bit_impl() local 431 uintptr_t old; _Py_atomic_load_64bit_impl() local 469 int old; _Py_atomic_load_32bit_impl() local [all...] |
/kernel/linux/linux-6.6/arch/powerpc/include/asm/ |
H A D | cmpxchg.h | 42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ 49 old <<= bitoff; \ 67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \ 269 * Compare and exchange - if *p == old, set it to new, 270 * and return the old value of *p. 283 __cmpxchg_u8(volatile unsigned char *p, unsigned long old, unsigned long new) in __cmpxchg_u8() argument 298 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8() 305 __cmpxchg_u8_local(volatile unsigned char *p, unsigned long old, in __cmpxchg_u8_local() argument 318 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8_local() 325 __cmpxchg_u8_relaxed(u8 *p, unsigned long old, unsigne argument 344 __cmpxchg_u8_acquire(u8 *p, unsigned long old, unsigned long new) __cmpxchg_u8_acquire() argument 364 __cmpxchg_u16(volatile unsigned short *p, unsigned long old, unsigned long new) __cmpxchg_u16() argument 385 __cmpxchg_u16_local(volatile unsigned short *p, unsigned long old, unsigned long new) __cmpxchg_u16_local() argument 405 __cmpxchg_u16_relaxed(u16 *p, unsigned long old, unsigned long new) __cmpxchg_u16_relaxed() argument 424 __cmpxchg_u16_acquire(u16 *p, unsigned long old, unsigned long new) __cmpxchg_u16_acquire() argument 445 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) __cmpxchg_u32() argument 467 __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, unsigned long new) __cmpxchg_u32_local() argument 488 __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new) __cmpxchg_u32_relaxed() argument 515 __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new) __cmpxchg_u32_acquire() argument 537 __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) __cmpxchg_u64() argument 559 __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, unsigned long new) __cmpxchg_u64_local() argument 580 __cmpxchg_u64_relaxed(u64 *p, unsigned long old, unsigned long new) __cmpxchg_u64_relaxed() argument 599 __cmpxchg_u64_acquire(u64 *p, unsigned long old, unsigned long new) __cmpxchg_u64_acquire() argument 621 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg() argument 641 __cmpxchg_local(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_local() argument 661 __cmpxchg_relaxed(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_relaxed() argument 681 __cmpxchg_acquire(void *ptr, unsigned long old, unsigned long new, unsigned int size) __cmpxchg_acquire() argument [all...] |
/kernel/linux/linux-5.10/lib/ |
H A D | errseq.c | 60 errseq_t cur, old; in errseq_set() local 71 old = READ_ONCE(*eseq); in errseq_set() 75 return old; in errseq_set() 81 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set() 84 if (old & ERRSEQ_SEEN) in errseq_set() 88 if (new == old) { in errseq_set() 94 cur = cmpxchg(eseq, old, new); in errseq_set() 100 if (likely(cur == old || cur == new)) in errseq_set() 104 old = cur; in errseq_set() 115 * If the error has been "seen", new callers will not see an old erro 124 errseq_t old = READ_ONCE(*eseq); errseq_sample() local 177 errseq_t old, new; errseq_check_and_advance() local [all...] |
/kernel/linux/linux-6.6/lib/ |
H A D | errseq.c | 61 errseq_t cur, old; in errseq_set() local 72 old = READ_ONCE(*eseq); in errseq_set() 76 return old; in errseq_set() 82 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set() 85 if (old & ERRSEQ_SEEN) in errseq_set() 89 if (new == old) { in errseq_set() 95 cur = cmpxchg(eseq, old, new); in errseq_set() 101 if (likely(cur == old || cur == new)) in errseq_set() 105 old = cur; in errseq_set() 116 * If the error has been "seen", new callers will not see an old erro 125 errseq_t old = READ_ONCE(*eseq); errseq_sample() local 178 errseq_t old, new; errseq_check_and_advance() local [all...] |
/kernel/linux/linux-5.10/kernel/ |
H A D | tracepoint.c | 142 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument 144 if (old) { in release_probes() 145 struct tp_probes *tp_probes = container_of(old, in release_probes() 183 struct tracepoint_func *old, *new; in func_add() local 192 old = *funcs; in func_add() 193 if (old) { in func_add() 195 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add() 197 if (pos < 0 && old[nr_probes].prio < prio) in func_add() 199 if (old[nr_probes].func == tp_func->func && in func_add() 200 old[nr_probe in func_add() 252 struct tracepoint_func *old, *new; func_remove() local 348 struct tracepoint_func *old, *tp_funcs; tracepoint_add_func() local 420 struct tracepoint_func *old, *tp_funcs; tracepoint_remove_func() local [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | refcount.h | 32 * int old = atomic_fetch_add_relaxed(r); 33 * // old is INT_MAX, refcount now INT_MIN (0x8000_0000) 34 * if (old < 0) 152 int old = refcount_read(r); in __refcount_add_not_zero() local 155 if (!old) in __refcount_add_not_zero() 157 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &old, old + i)); in __refcount_add_not_zero() 160 *oldp = old; in __refcount_add_not_zero() 162 if (unlikely(old < 0 || old in __refcount_add_not_zero() 193 int old = atomic_fetch_add_relaxed(i, &r->refs); __refcount_add() local 272 int old = atomic_fetch_sub_release(i, &r->refs); __refcount_sub_and_test() local 338 int old = atomic_fetch_sub_release(1, &r->refs); __refcount_dec() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | refcount.h | 32 * int old = atomic_fetch_add_relaxed(r); 33 * // old is INT_MAX, refcount now INT_MIN (0x8000_0000) 34 * if (old < 0) 152 int old = refcount_read(r); in __refcount_add_not_zero() local 155 if (!old) in __refcount_add_not_zero() 157 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &old, old + i)); in __refcount_add_not_zero() 160 *oldp = old; in __refcount_add_not_zero() 162 if (unlikely(old < 0 || old in __refcount_add_not_zero() 193 int old = atomic_fetch_add_relaxed(i, &r->refs); __refcount_add() local 272 int old = atomic_fetch_sub_release(i, &r->refs); __refcount_sub_and_test() local 338 int old = atomic_fetch_sub_release(1, &r->refs); __refcount_dec() local [all...] |
/kernel/linux/linux-6.6/security/safesetid/ |
H A D | lsm.c | 144 * Check whether a caller with old credentials @old is allowed to switch to 147 static bool id_permitted_for_cred(const struct cred *old, kid_t new_id, enum setid_type new_type) in id_permitted_for_cred() argument 151 /* If our old creds already had this ID in it, it's fine. */ in id_permitted_for_cred() 153 if (uid_eq(new_id.uid, old->uid) || uid_eq(new_id.uid, old->euid) || in id_permitted_for_cred() 154 uid_eq(new_id.uid, old->suid)) in id_permitted_for_cred() 157 if (gid_eq(new_id.gid, old->gid) || gid_eq(new_id.gid, old->egid) || in id_permitted_for_cred() 158 gid_eq(new_id.gid, old in id_permitted_for_cred() 190 safesetid_task_fix_setuid(struct cred *new, const struct cred *old, int flags) safesetid_task_fix_setuid() argument 214 safesetid_task_fix_setgid(struct cred *new, const struct cred *old, int flags) safesetid_task_fix_setgid() argument 238 safesetid_task_fix_setgroups(struct cred *new, const struct cred *old) safesetid_task_fix_setgroups() argument [all...] |
/kernel/linux/linux-5.10/arch/s390/include/asm/ |
H A D | atomic_ops.h | 16 op_type old; \ 19 op_string " %[old],%[val],%[ptr]\n" \ 21 : [old] "=d" (old), [ptr] "+Q" (*ptr) \ 23 return old; \ 67 int old, new; \ 70 "0: lr %[new],%[old]\n" \ 72 " cs %[old],%[new],%[ptr]\n" \ 74 : [old] "=d" (old), [ne 123 __atomic_cmpxchg(int *ptr, int old, int new) __atomic_cmpxchg() argument 128 __atomic_cmpxchg_bool(int *ptr, int old, int new) __atomic_cmpxchg_bool() argument 133 __atomic64_cmpxchg(long *ptr, long old, long new) __atomic64_cmpxchg() argument 138 __atomic64_cmpxchg_bool(long *ptr, long old, long new) __atomic64_cmpxchg_bool() argument [all...] |