vme_master_rmw(9)
π
vme_master_rmw β the vme_master_rmw(9) glow-up
okay so bestie, gather round, because today we're learning about vme_master_rmw(9) from the Kernel API Manual and honestly? she's a lil baddie with a very specific job. no cap. π
β¨ NAME β¨
vme_master_rmw β perform a read-modify-write cycle. that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
unsigned int vme_master_rmw (struct vme_resource *resource , unsigned
int mask , unsigned int compare , unsigned int swap , loff_t offset );
like, look at her. five arguments, one unsigned int coming back. main character energy fr fr. π
π ARGUMENTS π
resourceβ pointer to the VME master resource. she's the one holding the keys, so pls make sure it's actually a VME master resource (more on that in RETURN, bestie π).maskβ the bits that get compared and swapped in this whole operation. think of it as the guest list: only these bits are even invited to the party.compareβ the bits that get compared against the data read fromoffset. this is the ~reference photo~ your bits have to match.swapβ the bits that get swapped in the data read fromoffset. this is the glow-up that actually happens.offsetβ offset into the VME master window where we're doing the whole operation. yes, exactly there. no, not there. there. π
π¦ DESCRIPTION π¦
okay so the way this works is: it performs a read-modify-write cycle on the provided location. and the little four-step choreography is:
- first, the location on the VME bus is read. β
- then, the bits selected by
maskare compared withcompare. vibe check on the bits. - then β and this is the iconic part β where a selected bit matches that in
compareand those bits are selected inswap, the bit gets swapped. π₯ - finally, the result is written back to the location on the VME bus. slay, we're done here. π
like, it's giving read. compare. swap. write. in that order. every single time. periodt.
π RETURN π
- Bytes written on success. we love a win. π
-EINVALifresourceis not a VME master resource, or if the RMW operation is not supported. so like... check your resource first, bestie, or you're gonna have a bad time. π- Hardware specific errors may also be returned. yeah. those exist. not our department. π
π SEE ALSO π
kernel file ./drivers/staging/vme_user/vme.c β and yes, the whole friend group is here, say hi:
vme_alloc_consistent(9)vme_free_consistent(9)vme_get_size(9)vme_slave_request(9)vme_slave_set(9)vme_slave_get(9)vme_slave_free(9)vme_master_request(9)vme_master_set(9)vme_master_get(9)vme_master_read(9)vme_master_write(9)vme_master_mmap_prepare(9)vme_master_free(9)vme_dma_request(9)vme_new_dma_list(9)vme_dma_pattern_attribute(9)vme_dma_pci_attribute(9)vme_dma_vme_attribute(9)vme_dma_free_attribute(9)vme_dma_list_add(9)vme_dma_list_exec(9)vme_dma_list_free(9)vme_dma_free(9)vme_irq_request(9)vme_irq_free(9)vme_irq_generate(9)vme_lm_request(9)vme_lm_count(9)vme_lm_set(9)vme_lm_get(9)vme_lm_attach(9)vme_lm_detach(9)vme_lm_free(9)vme_slot_num(9)vme_bus_num(9)vme_register_driver(9)vme_unregister_driver(9)
and that's the whole page, bestie π this cutie lives under ./drivers/staging/vme_user, and the page dates to October 2026 β vme_master_rmw(9), forever and always. iykyk π«Άβ¨
π¦ 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