relay_mmap_prepare_buf(9)
π relay_mmap_prepare_buf(9) π
okay so bestie, we're in the Kernel API Manual today and this one is a whole little function that's like "hey, let me hook this channel buffer up to a process address space" π«Ά
β¨ NAME β¨
relay_mmap_prepare_buf β mmap channel buffer to process address space
like literally that's the whole vibe: you got a buffer, you got a process address space, and this lil guy is the matchmaker π
π SYNOPSIS π
int relay_mmap_prepare_buf (struct rchan_buf *buf , struct vm_area_desc
*desc );
she takes two pointers and returns an int, that's the whole shape of her π₯
πΈ ARGUMENTS πΈ
bufβ the relay channel buffer π« like, the actual buffer we're talking about heredescβ describing what to map π¦ she's the one holding the description of the mapping, iykyk
β DESCRIPTION β
Returns 0 if ok, negative on error. that's it, that's the contract, no cap π
π¨ also: caller should already have grabbed mmap_lock. so like, do that first bestie. this function is not out here grabbing locks for you, she assumes you already did it. not her job, fr fr π
π SEE ALSO π
Kernel file ./kernel/relay.c, plus the whole relay fam in alphabetical-ish order:
relay_alloc_buf(9)relay_create_buf(9)relay_destroy_channel(9)relay_destroy_buf(9)relay_remove_buf(9)relay_buf_empty(9)relay_buf_full(9)wakeup_readers(9)__relay_reset(9)relay_reset(9)relay_close_buf(9)relay_open(9)relay_switch_subbuf(9)relay_subbufs_consumed(9)relay_close(9)relay_flush(9)relay_stats(9)relay_file_open(9)relay_file_mmap_prepare(9)relay_file_poll(9)relay_file_release(9)relay_file_read_subbuf_avail(9)relay_file_read_start_pos(9)relay_file_read_end_pos(9)
β¨ and that's the page β¨ this icon lived in ./kernel and the date on her birth certificate says October 2026 π go grab mmap_lock before you call her, mwah, ily, bye π
π
π¦ 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