mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Start process handles at 1
The 0 index was still sometimes not handled properly in the hash table. Also 0 is sometimes indicative of an error. Let's just start handles from 1 to avoid those issues.
This commit is contained in:
@@ -17,13 +17,13 @@ kutil::vector<process*> process::s_processes;
|
||||
|
||||
process::process() :
|
||||
kobject {kobject::type::process},
|
||||
m_next_handle {0},
|
||||
m_next_handle {1},
|
||||
m_state {state::running}
|
||||
{
|
||||
s_processes.append(this);
|
||||
|
||||
j6_handle_t self = add_handle(this);
|
||||
kassert(self == self_handle(), "Process self-handle is not 0");
|
||||
kassert(self == self_handle(), "Process self-handle is not 1");
|
||||
}
|
||||
|
||||
// The "kernel process"-only constructor
|
||||
|
||||
Reference in New Issue
Block a user