STRUCT SYNC_FILE(9)
π struct sync_file(9) β a Kernel API Manual moment π
okay bestie, we're in the struct sync_file(9) girlie-verse today β this is the kernel API manual page for the little struct that lets you export a sync file to userspace β¨
πΈ NAME πΈ
struct sync_file β sync file to export to the userspace π«
β¨ SYNOPSIS β¨
struct sync_file {
struct file *file;
char user_name[32];
#ifdef CONFIG_DEBUG_FS;
struct list_head sync_file_list;
#endif;
wait_queue_head_t wq;
unsigned long flags;
struct dma_fence *fence;
struct dma_fence_cb cb;
};
no cap, that's the whole vibe right there π copy it exactly, she's precise π
π¦ Members π¦
fileβ the file representing this fence. lowkey the whole main character of the struct π«Άuser_nameβ the name of the sync file, handed to us by userspace β but only for merged fences, bestie. otherwise it's generated through driver callbacks, and in that case the entire array is0π (yes, literally the whole thing, all zeroes)sync_file_listβ membership in the global file list π psst: this one's tucked inside the#ifdef CONFIG_DEBUG_FS;so she only shows up when debug fs is in the building πwqβ wait queue for fence signaling β³ this is where everybody waits around for the signal, iconic behavior honestlyflagsβ flags for the sync_file π©fenceβ fence with the fences in the sync_file π₯ (yes, fences plural, she contains multitudes)cbβ fence callback information π the callback deets live here
π Description π
flags time, bestie: POLL_ENABLED β whether userspace is currently poll'ing or not π that's it, that's the flag. simply asking "are you polling rn?"
π SEE ALSO π
- Kernel file
./include/linux/sync_file.hβ go read her, iykyk π
and that's a wrap on this one, gorgeous π this came to you from ./include/linux, dated October 2026, and yes β it's still struct sync_file(9), always and forever πππ¦
π¦ 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