[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:
Justin C. Miller
2022-10-22 16:49:25 -07:00
parent 99b59393fe
commit 6ac4ec601d
7 changed files with 17 additions and 23 deletions

View File

@@ -18,13 +18,12 @@ class channel :
{
public:
/// 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();
virtual ~channel();
static constexpr kobject::type type = kobject::type::channel;
/// Put a message into the channel
/// \arg data Buffer of data to write
/// \returns The number of bytes successfully written

View File

@@ -10,14 +10,12 @@
namespace obj {
class thread;
class event :
public kobject
{
public:
/// 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;
event();

View File

@@ -26,8 +26,7 @@ public:
using reply_tag_t = uint64_t;
/// 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;
/// Max message handle count

View File

@@ -19,19 +19,21 @@ class process :
{
public:
/// 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
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
constexpr static uintptr_t stacks_top = 0x0000800000000000;
static constexpr uintptr_t stacks_top = 0x0000800000000000;
/// 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
constexpr static uint8_t default_priority = 0xff;
static constexpr uint8_t default_priority = 0xff;
static constexpr kobject::type type = kobject::type::process;
/// Constructor.
process();
@@ -39,8 +41,6 @@ public:
/// Destructor.
virtual ~process();
static constexpr kobject::type type = kobject::type::process;
/// Get the currently executing process.
static process & current();

View File

@@ -12,8 +12,7 @@ class system :
{
public:
/// 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;
inline static system & get() { return s_instance; }

View File

@@ -55,10 +55,12 @@ class thread :
{
public:
/// 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
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 {
none = 0x00,
@@ -71,8 +73,6 @@ public:
/// Destructor
virtual ~thread();
static constexpr kobject::type type = kobject::type::thread;
/// Get the currently executing thread.
static thread & current();

View File

@@ -35,8 +35,7 @@ class vm_area :
{
public:
/// 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;
/// Constructor.