[kernel] Make default_priority naming consistent

The naming was default_pri in process, but default_priority in
scheduler. Normalize to the longer name.
This commit is contained in:
Justin C. Miller
2021-01-28 01:01:40 -08:00
parent 211a3c2358
commit 71dc332dae
2 changed files with 5 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ process::update()
thread * thread *
process::create_thread(uint8_t priority, bool user) process::create_thread(uint8_t priority, bool user)
{ {
if (priority == default_pri) if (priority == default_priority)
priority = scheduler::default_priority; priority = scheduler::default_priority;
thread *th = new thread(*this, priority); thread *th = new thread(*this, priority);
@@ -123,6 +123,8 @@ process::thread_exited(thread *th)
remove_handle(th->self_handle()); remove_handle(th->self_handle());
delete th; delete th;
// TODO: delete the thread's stack VMA
if (m_threads.count() == 0) { if (m_threads.count() == 0) {
exit(status); exit(status);
return true; return true;

View File

@@ -19,7 +19,7 @@ public:
constexpr static size_t stack_size = 0x4000; constexpr static size_t stack_size = 0x4000;
/// Value that represents default priority /// Value that represents default priority
constexpr static uint8_t default_pri = 0xff; constexpr static uint8_t default_priority = 0xff;
/// Constructor. /// Constructor.
process(); process();
@@ -46,7 +46,7 @@ public:
/// \args priority The new thread's scheduling priority /// \args priority The new thread's scheduling priority
/// \args user If true, create a userspace stack for this thread /// \args user If true, create a userspace stack for this thread
/// \returns The newly created thread object /// \returns The newly created thread object
thread * create_thread(uint8_t priorty = default_pri, bool user = true); thread * create_thread(uint8_t priorty = default_priority, bool user = true);
/// Start tracking an object with a handle. /// Start tracking an object with a handle.
/// \args obj The object this handle refers to /// \args obj The object this handle refers to