mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Add initial pass of syscall API kobjects
This commit is contained in:
30
src/kernel/objects/handle.h
Normal file
30
src/kernel/objects/handle.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
/// \file handle.h
|
||||
/// Defines types for user handles to kernel objects
|
||||
|
||||
#include "j6/types.h"
|
||||
#include "objects/kobject.h"
|
||||
|
||||
class handle
|
||||
{
|
||||
public:
|
||||
/// Move constructor. Takes ownership of the object from other.
|
||||
handle(handle&& other);
|
||||
|
||||
/// Constructor.
|
||||
/// \arg owner koid of the process that has this handle
|
||||
/// \arg rights access rights this handle has over the object
|
||||
/// \arg obj the object held
|
||||
handle(j6_koid_t owner, j6_rights_t rights, kobject *obj);
|
||||
|
||||
~handle();
|
||||
|
||||
handle() = delete;
|
||||
handle(const handle &other) = delete;
|
||||
handle & operator=(const handle& other) = delete;
|
||||
|
||||
private:
|
||||
j6_koid_t m_owner;
|
||||
kobject *m_object;
|
||||
j6_rights_t m_rights;
|
||||
};
|
||||
Reference in New Issue
Block a user