rcu_pointer_handoff(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, you have opened rcu_pointer_handoff(9) from the Kernel API Manual ✨ the NAME of the game is: rcu_pointer_handoff β€” hand off a pointer from RCU to other mechanism. periodt. πŸ’…

✨ SYNOPSIS ✨

rcu_pointer_handoff (p );

🫢 ARGUMENTS 🫢

  • p β€” The pointer to hand off. that's it, that's the whole argument, iconic and minimal πŸŽ€

🌸 DESCRIPTION 🌸

okay so here's the tea: this is simply an identity function, but it documents where a pointer is handed off from RCU to some other synchronization mechanism β€” for example, reference counting or locking. In C11, it would map to kill_dependency. it could be used as follows:

            rcu_read_lock;
            p = rcu_dereference(gp);
            long_lived = is_long_lived(p);
            if (long_lived) {
                    if (!atomic_inc_not_zero(p->refcnt))
                            long_lived = false;
                    else
                            p = rcu_pointer_handoff(p);
            }
            rcu_read_unlock;

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./include/linux/rcupdate.h β€” and the whole cross-ref group chat is: same_state_synchronize_rcu(9), cond_resched_tasks_rcu_qs(9), rcu_softirq_qs_periodic(9), RCU_LOCKDEP_WARN(9), lockdep_assert_in_rcu_read_lock(9), lockdep_assert_in_rcu_read_lock_bh(9), lockdep_assert_in_rcu_read_lock_sched(9), lockdep_assert_in_rcu_reader(9), unrcu_pointer(9), RCU_INITIALIZER(9), rcu_assign_pointer(9), rcu_replace_pointer(9), rcu_access_pointer(9), rcu_dereference_check(9), rcu_dereference_bh_check(9), rcu_dereference_sched_check(9), rcu_dereference_all_check(9), rcu_dereference_protected(9), rcu_dereference(9), rcu_dereference_bh(9), rcu_dereference_sched(9), rcu_dereference_all(9), rcu_read_lock(9), rcu_read_unlock(9), rcu_read_lock_bh(9), rcu_read_unlock_bh(9), rcu_read_lock_sched(9), rcu_read_unlock_sched(9), RCU_INIT_POINTER(9), RCU_POINTER_INITIALIZER(9), kfree_rcu(9), kfree_rcu_mightsleep(9), kfree_rcu_nolock(9), rcu_head_init(9), rcu_head_after_call_rcu(9).

ngl that's a long list but every single one ate πŸ’…

okay bye bestie 🫢 β€” source/version: ./include/linux; date: October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from