[kernel] Get rid of obsolete thread loading state

The thread::state::loading flag was left over from a time when the
kernel did elf loading for all processes.
This commit is contained in:
Justin C. Miller
2022-01-30 20:50:48 -08:00
parent 42774d94c0
commit 9945ebab34
3 changed files with 5 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ static constexpr j6_signal_t thread_default_signals = 0;
thread::thread(process &parent, uint8_t pri, uintptr_t rsp0) :
kobject(kobject::type::thread, thread_default_signals),
m_parent(parent),
m_state(state::loading),
m_state(state::none),
m_wait_type(wait_type::none),
m_wait_data(0),
m_wait_obj(0)

View File

@@ -67,11 +67,11 @@ public:
constexpr static j6_cap_t parent_caps = j6_cap_thread_all;
enum class state : uint8_t {
none = 0x00,
ready = 0x01,
loading = 0x02,
exited = 0x04,
constant = 0x80,
none = 0x00
exited = 0x02,
constant = 0x80
};
/// Destructor
@@ -86,10 +86,6 @@ public:
/// \returns True if the thread is ready to execute.
inline bool ready() const { return has_state(state::ready); }
/// Get the `loading` state of the thread.
/// \returns True if the thread has not finished loading.
inline bool loading() const { return has_state(state::loading); }
/// Get the `constant` state of the thread.
/// \returns True if the thread has constant priority.
inline bool constant() const { return has_state(state::constant); }