__atomic_add_ifless(9)
πΈ __atomic_add_ifless (9) β kernel API manual, bestie edition πΈ
okay so quick vibe check: this is the __atomic_add_ifless(9) page from the kernel API manual. yes it's a real one. yes it's niche. and yes, we're gonna get through it together π
β¨ NAME β¨
__atomic_add_ifless β add if the result is less than a given value.
like, conditional addition. it only commits the add when the outcome passes the vibe check π
β¨ SYNOPSIS β¨
bool __atomic_add_ifless (atomic_t *v , int a , int u );
she returns a bool. noted. π
β¨ ARGUMENTS β¨
vβ pointer of typeatomic_t. this is the thing we're adding to, bestie π«Άaβ the amount to add tov...uβ ...if(v + a)is less thanu.
ok the way those last two args literally finish each other's sentences?? that's the whole gag, no cap π it's giving "one thought split across two arguments."
β¨ DESCRIPTION β¨
returns true if (v + a) was less than u, and false otherwise.
that's it. that's the function. tiny, iconic, does exactly one job π
ngl, the naming is doing a lot of heavy lifting here β read it as "atomic add, if less" and you're basically already a kernel dev π
β¨ SEE ALSO β¨
ok buckle up bestie, this list is long β but every single one of these is real and lives in the same little corner of the kernel π
Kernel file ./drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.cβ the actual file where the fun happens, fr frbnx2x_exe_queue_init(9)bnx2x_exe_queue_add(9)bnx2x_exe_queue_step(9)bnx2x_state_wait(9)__bnx2x_vlan_mac_h_write_trylock(9)__bnx2x_vlan_mac_h_exec_pending(9)__bnx2x_vlan_mac_h_pend(9)__bnx2x_vlan_mac_h_write_unlock(9)__bnx2x_vlan_mac_h_read_lock(9)bnx2x_vlan_mac_h_read_lock(9)__bnx2x_vlan_mac_h_read_unlock(9)bnx2x_vlan_mac_h_read_unlock(9)bnx2x_vlan_mac_set_cmd_hdr_e2(9)bnx2x_vlan_mac_set_rdata_hdr_e2(9)bnx2x_vlan_mac_set_rdata_hdr_e1x(9)bnx2x_set_one_mac_e1x(9)bnx2x_set_one_vlan_mac_e1h(9)bnx2x_vlan_mac_restore(9)bnx2x_validate_vlan_mac_add(9)bnx2x_validate_vlan_mac_del(9)bnx2x_validate_vlan_mac_move(9)bnx2x_wait_vlan_mac(9)bnx2x_complete_vlan_mac(9)bnx2x_optimize_vlan_mac(9)bnx2x_vlan_mac_get_registry_elem(9)bnx2x_execute_vlan_mac(9)bnx2x_config_vlan_mac(9)bnx2x_vlan_mac_del_all(9)bnx2x_mcast_get_next_bin(9)bnx2x_mcast_clear_first_bin(9)bnx2x_mcast_handle_restore_cmd_e2(9)bnx2x_mcast_handle_current_cmd(9)bnx2x_mcast_set_rdata_hdr_e2(9)bnx2x_mcast_refresh_registry_e2(9)bnx2x_mcast_set_rdata_hdr_e1(9)bnx2x_mcast_handle_restore_cmd_e1(9)bnx2x_get_fw_mac_addr(9)bnx2x_mcast_refresh_registry_e1(9)__atomic_dec_ifmoe(9)bnx2x_init_credit_pool(9)bnx2x_debug_print_ind_table(9)bnx2x_setup_rss(9)bnx2x_queue_state_change(9)bnx2x_queue_comp_cmd(9)bnx2x_q_init(9)bnx2x_q_send_deactivate(9)bnx2x_q_send_activate(9)bnx2x_queue_chk_transition(9)bnx2x_func_state_change_comp(9)bnx2x_func_comp_cmd(9)bnx2x_func_chk_transition(9)bnx2x_func_init_func(9)bnx2x_func_init_port(9)bnx2x_func_init_cmn_chip(9)bnx2x_func_init_cmn(9)bnx2x_func_reset_func(9)bnx2x_func_reset_port(9)bnx2x_func_reset_cmn(9)bnx2x_func_state_change(9)
like, the bnx2x crew really said "we're all showing up to this page" and honestly? respect π€π
π cute lil sign-off π
this page ships out of ./drivers/net/ethernet/broadco... and it's dated October 2026 β so yeah, she's a keeper from the future-ish. go read the kernel file, hydrate, and remember: add only if less. periodt π
β¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms