[zion] Move to default permissions being supplied by KernelObjects

This commit is contained in:
Drew Galbraith 2023-08-01 18:22:41 -07:00
parent 48c6e5b3a4
commit 1364fbed9f
16 changed files with 91 additions and 54 deletions

View file

@ -4,6 +4,7 @@
#include <glacier/memory/ref_ptr.h>
#include <stdint.h>
#include "include/ztypes.h"
#include "object/kernel_object.h"
// Forward decl due to cyclic dependency.
@ -18,6 +19,10 @@ struct KernelObjectTag<Thread> {
class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
public:
uint64_t TypeTag() override { return KernelObject::THREAD; }
static uint64_t DefaultPermissions() {
return kZionPerm_Read | kZionPerm_Write;
}
enum State {
UNSPECIFIED,
CREATED,