sync_file_merge(9)
π sync_file_merge β a Kernel API Manual moment β¨
okay so bestie, the manual name is literally sync_file_merge(9) and it lives in the Kernel API Manual β and it's giving "merge two sync_files" in the most iconic way possible. let's get into it π
π¦ NAME
sync_file_merge β merge two sync_files (yes, that's the whole vibe, and yes, it ate)
β¨ SYNOPSIS
struct sync_file * sync_file_merge (const char *name , struct sync_file
*a , struct sync_file *b );
πΈ ARGUMENTS
nameβ the name of the new fence. like, you gotta name your baby before it exists, that's the rule πΌaβ sync_file a, one of the two besties getting mergedbβ sync_file b, the other one. it takes two to merge, no cap π
π DESCRIPTION
so what it does is it creates a new sync_file which contains copies of all the fences in both a and b. copies, bestie β the originals stay exactly as they are.
a and b remain valid, independent sync_file. they don't get consumed, they don't get clobbered, they just keep living their truth π¦
and it returns the new merged sync_file β or NULL in case of error π (yes, always check your return value, that's the main character move).
π«Ά SEE ALSO
- Kernel file
./drivers/dma-buf/sync_file.c sync_file_create(9)sync_file_get_fence(9)sync_file_get_name(9)
all of these are lowkey required reading, iykyk π
ngl, the NULL on error is the one thing you cannot sleep on. check it first, everything else second. π₯
and that's the whole page, periodt π β courtesy of ./drivers/dma-buf, the October 2026 edition of the Kernel API Manual. go forth and merge responsibly, bestie πβ
π¦ 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