Files
jsix/src/kernel/objects/system.h
Justin C. Miller 6ac4ec601d [kernel] standardize static constexpr order in kobject headers
The kobject headers flip-flopped the class constants between "static
constexpr" and "constexpr static".
2023-01-14 15:43:07 -08:00

30 lines
647 B
C++

#pragma once
/// \file system.h
/// Definition of kobject type representing the system
#include <j6/cap_flags.h>
#include "objects/kobject.h"
namespace obj {
class system :
public kobject
{
public:
/// Capabilities on system given to init
static constexpr j6_cap_t init_caps = j6_cap_system_all;
static constexpr kobject::type type = kobject::type::system;
inline static system & get() { return s_instance; }
protected:
/// Don't delete the system object on no handles.
virtual void on_no_handles() override {}
private:
static system s_instance;
system() : kobject(type::system) {}
};
} // namespace obj