#pragma once #include "thread/Thread.h" #include #define enumerate_promises(_p) \ _p(stdio) _p(rpath) _p(wpath) _p(cpath) _p(fattr) _p(chown) _p(unix) _p(tty) _p(proc) _p(exec) _p(prot_exec) \ _p(id) _p(mount) _p(signal) _p(host) _p(error) enum class Promise { #define __enumerate(promise) p_##promise, enumerate_promises(__enumerate) #undef __enumerate num_promises, }; Result check_pledge(Thread* thread, Promise promise); Result parse_promises(u64 pledge);