apio
993e94cc76
Some checks failed
continuous-integration/drone/push Build is failing
This follows OpenBSD and makes it so stdio is sufficient for an abort() call.
20 lines
598 B
C
20 lines
598 B
C
#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) \
|
|
_p(id) _p(mount) _p(host) _p(error)
|
|
|
|
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);
|