wlroots/include/util/cleanup.h
Kurt Kartaltepe 5cc737d599 render,types/wlr_shm: Offload slow cleanup ops
Defers close()/munmap() calls into a cleanup thread in to avoid blocking
when they are slow. This is most noticable on low end hardware with
large screens where large surfaces can spend considerable time
invalidating mmus on the gpu or clearing shmem pages.
2024-07-27 13:18:26 -07:00

10 lines
211 B
C

typedef void (*wlr_task_cb)(void *data);
struct wlr_task {
wlr_task_cb task;
void *data;
};
void wlr_cleanup_queue_init(void);
void wlr_cleanup_queue_finish(void);
void wlr_cleanup_defer(struct wlr_task t);