[kernel] standardize static constexpr order in kobject headers
The kobject headers flip-flopped the class constants between "static constexpr" and "constexpr static".
This commit is contained in:
@@ -18,13 +18,12 @@ class channel :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on a newly constructed channel handle
|
/// Capabilities on a newly constructed channel handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_channel_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_channel_all;
|
||||||
|
static constexpr kobject::type type = kobject::type::channel;
|
||||||
|
|
||||||
channel();
|
channel();
|
||||||
virtual ~channel();
|
virtual ~channel();
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::channel;
|
|
||||||
|
|
||||||
/// Put a message into the channel
|
/// Put a message into the channel
|
||||||
/// \arg data Buffer of data to write
|
/// \arg data Buffer of data to write
|
||||||
/// \returns The number of bytes successfully written
|
/// \returns The number of bytes successfully written
|
||||||
|
|||||||
@@ -10,14 +10,12 @@
|
|||||||
|
|
||||||
namespace obj {
|
namespace obj {
|
||||||
|
|
||||||
class thread;
|
|
||||||
|
|
||||||
class event :
|
class event :
|
||||||
public kobject
|
public kobject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on a newly constructed event handle
|
/// Capabilities on a newly constructed event handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_event_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_event_all;
|
||||||
static constexpr kobject::type type = kobject::type::event;
|
static constexpr kobject::type type = kobject::type::event;
|
||||||
|
|
||||||
event();
|
event();
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ public:
|
|||||||
using reply_tag_t = uint64_t;
|
using reply_tag_t = uint64_t;
|
||||||
|
|
||||||
/// Capabilities on a newly constructed mailbox handle
|
/// Capabilities on a newly constructed mailbox handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_mailbox_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_mailbox_all;
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::mailbox;
|
static constexpr kobject::type type = kobject::type::mailbox;
|
||||||
|
|
||||||
/// Max message handle count
|
/// Max message handle count
|
||||||
|
|||||||
@@ -19,19 +19,21 @@ class process :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on a newly constructed process handle
|
/// Capabilities on a newly constructed process handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_process_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_process_all;
|
||||||
|
|
||||||
/// Capabilities on a process to itself
|
/// Capabilities on a process to itself
|
||||||
constexpr static j6_cap_t self_caps = j6_cap_process_all;
|
static constexpr j6_cap_t self_caps = j6_cap_process_all;
|
||||||
|
|
||||||
/// Top of memory area where thread stacks are allocated
|
/// Top of memory area where thread stacks are allocated
|
||||||
constexpr static uintptr_t stacks_top = 0x0000800000000000;
|
static constexpr uintptr_t stacks_top = 0x0000800000000000;
|
||||||
|
|
||||||
/// Size of userspace thread stacks
|
/// Size of userspace thread stacks
|
||||||
constexpr static size_t stack_size = 0x4000000; // 64MiB
|
static constexpr size_t stack_size = 0x4000000; // 64MiB
|
||||||
|
|
||||||
/// Value that represents default priority
|
/// Value that represents default priority
|
||||||
constexpr static uint8_t default_priority = 0xff;
|
static constexpr uint8_t default_priority = 0xff;
|
||||||
|
|
||||||
|
static constexpr kobject::type type = kobject::type::process;
|
||||||
|
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
process();
|
process();
|
||||||
@@ -39,8 +41,6 @@ public:
|
|||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~process();
|
virtual ~process();
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::process;
|
|
||||||
|
|
||||||
/// Get the currently executing process.
|
/// Get the currently executing process.
|
||||||
static process & current();
|
static process & current();
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ class system :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on system given to init
|
/// Capabilities on system given to init
|
||||||
constexpr static j6_cap_t init_caps = j6_cap_system_all;
|
static constexpr j6_cap_t init_caps = j6_cap_system_all;
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::system;
|
static constexpr kobject::type type = kobject::type::system;
|
||||||
|
|
||||||
inline static system & get() { return s_instance; }
|
inline static system & get() { return s_instance; }
|
||||||
|
|||||||
@@ -55,10 +55,12 @@ class thread :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on a newly constructed thread handle
|
/// Capabilities on a newly constructed thread handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_thread_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_thread_all;
|
||||||
|
|
||||||
/// Capabilities the parent process gets on new thread handles
|
/// Capabilities the parent process gets on new thread handles
|
||||||
constexpr static j6_cap_t parent_caps = j6_cap_thread_all;
|
static constexpr j6_cap_t parent_caps = j6_cap_thread_all;
|
||||||
|
|
||||||
|
static constexpr kobject::type type = kobject::type::thread;
|
||||||
|
|
||||||
enum class state : uint8_t {
|
enum class state : uint8_t {
|
||||||
none = 0x00,
|
none = 0x00,
|
||||||
@@ -71,8 +73,6 @@ public:
|
|||||||
/// Destructor
|
/// Destructor
|
||||||
virtual ~thread();
|
virtual ~thread();
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::thread;
|
|
||||||
|
|
||||||
/// Get the currently executing thread.
|
/// Get the currently executing thread.
|
||||||
static thread & current();
|
static thread & current();
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ class vm_area :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Capabilities on a newly constructed vma handle
|
/// Capabilities on a newly constructed vma handle
|
||||||
constexpr static j6_cap_t creation_caps = j6_cap_vma_all;
|
static constexpr j6_cap_t creation_caps = j6_cap_vma_all;
|
||||||
|
|
||||||
static constexpr kobject::type type = kobject::type::vma;
|
static constexpr kobject::type type = kobject::type::vma;
|
||||||
|
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
|
|||||||
Reference in New Issue
Block a user