#include "protector.h" #include static _Atomic(uintptr_t) protector; void proxy_set_protector(uintptr_t value) { atomic_store(&protector, value); } int proxy_protect(int fd) { uintptr_t value = atomic_load(&protector); if (!value) return 0; return ((int (*)(int))value)(fd); }