/linux-6.6.21/scripts/atomic/ |
D | gen-atomic-fallback.sh | 226 local cmpxchg="$1"; shift; 233 ___r = raw_${cmpxchg}${order}((_ptr), ___o, (_new)); \\ 243 local cmpxchg="$1"; shift 247 printf "#if defined(arch_try_${cmpxchg}${order})\n" 248 printf "#define raw_try_${cmpxchg}${order} arch_try_${cmpxchg}${order}\n" 251 printf "#elif defined(arch_try_${cmpxchg}_relaxed)\n" 252 printf "#define raw_try_${cmpxchg}${order}(...) \\\\\n" 253 printf " __atomic_op${forder}(arch_try_${cmpxchg}, __VA_ARGS__)\n" 257 printf "#elif defined(arch_try_${cmpxchg})\n" 258 printf "#define raw_try_${cmpxchg}${order} arch_try_${cmpxchg}\n" [all …]
|
/linux-6.6.21/net/ipv4/ |
D | protocol.c | 34 return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_add_protocol() 41 return !cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_add_offload() 50 ret = (cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_del_protocol() 63 ret = (cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_del_offload()
|
D | gre_demux.c | 36 return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? in gre_add_protocol() 48 ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? in gre_del_protocol()
|
/linux-6.6.21/net/ipv6/ |
D | protocol.c | 30 return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_add_protocol() 39 ret = (cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_del_protocol() 54 return !cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_add_offload() 63 ret = (cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_del_offload()
|
D | ip6_icmp.c | 18 return (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, NULL, fn) == NULL) ? in inet6_register_icmp_sender() 27 ret = (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, fn, NULL) == fn) ? in inet6_unregister_icmp_sender()
|
/linux-6.6.21/tools/testing/memblock/ |
D | Makefile | 33 test -L asm/cmpxchg.h || ln -s ../../../arch/x86/include/asm/cmpxchg.h asm/cmpxchg.h 39 $(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/asm.h asm/cmpxchg.h
|
D | .gitignore | 5 asm/cmpxchg.h
|
/linux-6.6.21/tools/include/asm-generic/ |
D | atomic-gcc.h | 65 #define cmpxchg(ptr, oldval, newval) \ macro 70 return cmpxchg(&(v)->counter, oldval, newval); in atomic_cmpxchg()
|
/linux-6.6.21/drivers/gpu/drm/ |
D | drm_lock.c | 75 prev = cmpxchg(lock, old, new); in drm_lock_take() 118 prev = cmpxchg(lock, old, new); in drm_lock_transfer() 141 prev = cmpxchg(lock, old, new); in drm_legacy_lock_free() 319 prev = cmpxchg(lock, old, DRM_KERNEL_CONTEXT); in drm_legacy_idlelock_release()
|
/linux-6.6.21/lib/ |
D | errseq.c | 95 cur = cmpxchg(eseq, old, new); in errseq_set() 201 cmpxchg(eseq, old, new); in errseq_check_and_advance()
|
/linux-6.6.21/Documentation/translations/zh_CN/locking/ |
D | mutex-design.rst | 48 (i) 快速路径:试图通过调用cmpxchg()修改锁的所有者为当前任务,以此原子化地 49 获取锁。这只在无竞争的情况下有效(cmpxchg()检查值是否为0,所以3个状态
|
/linux-6.6.21/arch/ia64/include/uapi/asm/ |
D | cmpxchg.h | 129 #define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n)) macro 132 #define cmpxchg_local cmpxchg
|
/linux-6.6.21/drivers/accessibility/speakup/ |
D | selection.c | 71 if (cmpxchg(&speakup_sel_work.tty, NULL, tty)) { in speakup_set_selection() 124 if (cmpxchg(&speakup_paste_work.tty, NULL, tty)) { in speakup_paste_selection()
|
/linux-6.6.21/arch/sh/kernel/cpu/sh2/ |
D | smp-j2.c | 28 while (cmpxchg(pmsg, messages, 0) != messages); in j2_ipi_interrupt_handler() 118 while (cmpxchg(pmsg, old, old|(1U<<message)) != old); in j2_send_ipi()
|
/linux-6.6.21/kernel/kcsan/ |
D | selftest.c | 153 KCSAN_CHECK_READ_BARRIER(cmpxchg(&test_var, 0, 0)); in test_barrier() 182 KCSAN_CHECK_WRITE_BARRIER(cmpxchg(&test_var, 0, 0)); in test_barrier() 214 KCSAN_CHECK_RW_BARRIER(cmpxchg(&test_var, 0, 0)); in test_barrier()
|
/linux-6.6.21/kernel/trace/ |
D | trace_recursion_record.c | 78 old = cmpxchg(&recursed_functions[index].ip, 0, ip); in ftrace_record_recursion() 112 cmpxchg(&recursed_functions[index].ip, ip, 0); in ftrace_record_recursion()
|
/linux-6.6.21/net/rxrpc/ |
D | call_event.c | 424 cmpxchg(&call->delay_ack_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_input_call_event() 432 cmpxchg(&call->ack_lost_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_input_call_event() 439 cmpxchg(&call->keepalive_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_input_call_event() 447 cmpxchg(&call->ping_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_input_call_event() 455 cmpxchg(&call->resend_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_input_call_event()
|
/linux-6.6.21/Documentation/locking/ |
D | rt-mutex.rst | 42 without waiters. The optimized fastpath operations require cmpxchg 66 with ->wait_lock is held. To prevent any fast path cmpxchg to the lock, 72 To prevent a cmpxchg of the owner releasing the lock, we need to
|
/linux-6.6.21/arch/nios2/include/asm/ |
D | Kbuild | 2 generic-y += cmpxchg.h
|
/linux-6.6.21/fs/nfs/ |
D | nfs3acl.c | 25 cmpxchg(p, ACL_NOT_CACHED, sentinel); in nfs3_prepare_get_acl() 34 if (cmpxchg(p, sentinel, acl) != sentinel) in nfs3_complete_get_acl() 43 cmpxchg(p, sentinel, ACL_NOT_CACHED); in nfs3_abort_get_acl()
|
/linux-6.6.21/arch/microblaze/include/asm/ |
D | Kbuild | 3 generic-y += cmpxchg.h
|
/linux-6.6.21/drivers/dma-buf/ |
D | dma-fence-array.c | 36 cmpxchg(&array->base.error, PENDING_ERROR, error); in dma_fence_array_set_pending_error() 42 cmpxchg(&array->base.error, PENDING_ERROR, 0); in dma_fence_array_clear_pending_error()
|
/linux-6.6.21/Documentation/features/locking/cmpxchg-local/ |
D | arch-support.txt | 2 # Feature name: cmpxchg-local
|
/linux-6.6.21/tools/arch/x86/include/asm/ |
D | atomic.h | 71 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg()
|
D | cmpxchg.h | 86 #define cmpxchg(ptr, old, new) \ macro
|