2023-08-12 19:38:25 +00:00
|
|
|
#pragma once
|
|
|
|
#include "thread/Thread.h"
|
|
|
|
#include <luna/Result.h>
|
|
|
|
|
|
|
|
#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) \
|
2023-08-22 11:34:30 +00:00
|
|
|
_p(id) _p(mount) _p(host) _p(error)
|
2023-08-12 19:38:25 +00:00
|
|
|
|
|
|
|
enum class Promise
|
|
|
|
{
|
|
|
|
#define __enumerate(promise) p_##promise,
|
|
|
|
enumerate_promises(__enumerate)
|
|
|
|
#undef __enumerate
|
|
|
|
num_promises,
|
|
|
|
};
|
|
|
|
|
|
|
|
Result<void> check_pledge(Thread* thread, Promise promise);
|
|
|
|
|
|
|
|
Result<int> parse_promises(u64 pledge);
|