Home
last modified time | relevance | path

Searched refs:cmpxchg (Results 1 – 25 of 222) sorted by relevance

123456789

/Linux-v5.4/net/ipv6/
Dprotocol.c30 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()
Dip6_icmp.c16 return (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, NULL, fn) == NULL) ? in inet6_register_icmp_sender()
25 ret = (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, fn, NULL) == fn) ? in inet6_unregister_icmp_sender()
/Linux-v5.4/net/ipv4/
Dprotocol.c40 return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_add_protocol()
47 return !cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_add_offload()
56 ret = (cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_del_protocol()
69 ret = (cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_del_offload()
Dgre_demux.c36 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-v5.4/arch/s390/include/asm/
Dcmpxchg.h15 #define cmpxchg(ptr, o, n) \ macro
22 #define cmpxchg64 cmpxchg
23 #define cmpxchg_local cmpxchg
24 #define cmpxchg64_local cmpxchg
/Linux-v5.4/include/asm-generic/
Datomic.h42 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
52 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
64 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
196 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
/Linux-v5.4/kernel/
Dtask_work.c37 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
74 else if (cmpxchg(pprev, work, work->next) == work) in task_work_cancel()
105 } while (cmpxchg(&task->task_works, work, head) != work); in task_work_run()
Dirq_work.c41 oflags = cmpxchg(&work->flags, flags, nflags); in irq_work_claim()
170 (void)cmpxchg(&work->flags, flags, flags & ~IRQ_WORK_BUSY); in irq_work_run_list()
/Linux-v5.4/tools/include/asm-generic/
Datomic-gcc.h64 #define cmpxchg(ptr, oldval, newval) \ macro
69 return cmpxchg(&(v)->counter, oldval, newval); in atomic_cmpxchg()
/Linux-v5.4/lib/
Dllist.c33 } while (cmpxchg(&head->first, first, new_first) != first); in llist_add_batch()
63 entry = cmpxchg(&head->first, old_entry, next); in llist_del_first()
Derrseq.c94 cur = cmpxchg(eseq, old, new); in errseq_set()
200 cmpxchg(eseq, old, new); in errseq_check_and_advance()
/Linux-v5.4/drivers/gpu/drm/
Ddrm_lock.c75 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()
320 prev = cmpxchg(lock, old, DRM_KERNEL_CONTEXT); in drm_legacy_idlelock_release()
/Linux-v5.4/arch/mips/kernel/
Dcmpxchg.c44 load32 = cmpxchg(ptr32, old32, new32); in __xchg_small()
100 load32 = cmpxchg(ptr32, old32, new32); in __cmpxchg_small()
/Linux-v5.4/arch/alpha/include/asm/
Dcmpxchg.h56 #define cmpxchg(ptr, o, n) \ macro
71 cmpxchg((ptr), (o), (n)); \
/Linux-v5.4/arch/sparc/include/asm/
Datomic_64.h53 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) in ATOMIC_OPS()
61 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
/Linux-v5.4/arch/arc/include/asm/
Dcmpxchg.h92 #define cmpxchg(ptr, o, n) ({ \ macro
104 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
/Linux-v5.4/arch/ia64/include/uapi/asm/
Dcmpxchg.h130 #define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n)) macro
133 #define cmpxchg_local cmpxchg
/Linux-v5.4/arch/sh/kernel/cpu/sh2/
Dsmp-j2.c28 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-v5.4/drivers/staging/speakup/
Dselection.c76 if (cmpxchg(&speakup_sel_work.tty, NULL, tty)) { in speakup_set_selection()
129 if (cmpxchg(&speakup_paste_work.tty, NULL, tty)) { in speakup_paste_selection()
/Linux-v5.4/net/rxrpc/
Dcall_event.c357 cmpxchg(&call->ack_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_process_call()
364 cmpxchg(&call->ack_lost_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_process_call()
371 cmpxchg(&call->keepalive_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_process_call()
380 cmpxchg(&call->ping_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_process_call()
387 cmpxchg(&call->resend_at, t, now + MAX_JIFFY_OFFSET); in rxrpc_process_call()
/Linux-v5.4/arch/riscv/include/asm/
Dcmpxchg.h340 #define cmpxchg(ptr, o, n) \ macro
354 cmpxchg((ptr), (o), (n)); \
366 cmpxchg((ptr), (o), (n)); \
/Linux-v5.4/drivers/dma-buf/
Ddma-fence-array.c36 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-v5.4/Documentation/locking/
Drt-mutex.rst42 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-v5.4/arch/mips/include/asm/
Dcmpxchg.h189 #define cmpxchg(ptr, old, new) \ macro
210 cmpxchg((ptr), (o), (n)); \
/Linux-v5.4/fs/nfs/
Dnfs3acl.c24 if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) { in nfs3_prepare_get_acl()
35 if (cmpxchg(p, sentinel, acl) != sentinel) in nfs3_complete_get_acl()
44 cmpxchg(p, sentinel, ACL_NOT_CACHED); in nfs3_abort_get_acl()

123456789