__mmc_claim_host(9)
π
__mmc_claim_host β like, the exclusive-host-claiming one π
okay so this is a page from the Kernel API Manual bestie, and it's all about __mmc_claim_host β the function that goes "this host is MINE" exclusively. no sharing, no splitting, periodt. π
β¨ NAME β¨
__mmc_claim_host β exclusively claim a host π«Ά
πΈ SYNOPSIS πΈ
int __mmc_claim_host (struct mmc_host *host , struct mmc_ctx *ctx ,
atomic_t *abort );
literally that's the whole signature, no cap β¨
π ARGUMENTS π
hostβ the mmc host you're claiming, bestie. this is the actual thing you want πctxβ the context that claims the host. orNULL, in which case the default context gets used instead (lowkey convenient ngl) πabortβ whether or not the operation should be aborted. yes it's a whole "should we bail" situation πββοΈ
π¦ DESCRIPTION π¦
so you're claiming a host for a set of operations. main character energy only, one at a time π
here's the tea though: if abort is non-null and dereferences to a non-zero value, then this will return prematurely with that non-zero value without acquiring the lock. like it just leaves, no lock, nothing. π
otherwise? it returns zero with the lock held. so like, zero means you got it, you're holding the lock, slay π
fr fr double-check that abort situation before you go assuming you've got the lock β a premature return means no lock at all, and that's the kind of thing that ruins your whole day π
π SEE ALSO π
the kernel file ./drivers/mmc/core/core.c says hi, and so do all these besties:
mmc_request_done(9)mmc_cqe_request_done(9)mmc_cqe_post_req(9)mmc_is_req_done(9)mmc_wait_for_req(9)mmc_wait_for_cmd(9)mmc_set_data_timeout(9)mmc_release_host(9)mmc_vdd_to_ocrbitnum(9)mmc_vddrange_to_ocrmask(9)mmc_handle_undervoltage(9)mmc_detect_change(9)mmc_erase(9)mmc_hw_reset(9)
go read them, they're iconic too π
okay that's the whole page, mwah π this one came out of ./drivers/mmc/core, dated October 2026, and it's filed under __mmc_claim_host(9) β take care of her, she holds locks π«Άβ¨
π¦ 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