mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Update kernel/{x64,x86}/process.cpp to current coding conventions.
This commit is contained in:
parent
3fa5fff3f5
commit
ccb0f368a3
2 changed files with 85 additions and 83 deletions
|
@ -32,8 +32,8 @@
|
||||||
#include <sortix/kernel/kernel.h>
|
#include <sortix/kernel/kernel.h>
|
||||||
#include <sortix/kernel/process.h>
|
#include <sortix/kernel/process.h>
|
||||||
|
|
||||||
namespace Sortix
|
namespace Sortix {
|
||||||
{
|
|
||||||
void Process::ExecuteCPU(int argc, char** argv, int envc, char** envp,
|
void Process::ExecuteCPU(int argc, char** argv, int envc, char** envp,
|
||||||
addr_t stackpos, addr_t entry,
|
addr_t stackpos, addr_t entry,
|
||||||
CPU::InterruptRegisters* regs)
|
CPU::InterruptRegisters* regs)
|
||||||
|
@ -47,7 +47,7 @@ namespace Sortix
|
||||||
regs->rdx = envc;
|
regs->rdx = envc;
|
||||||
regs->rcx = (size_t) envp;
|
regs->rcx = (size_t) envp;
|
||||||
regs->rip = entry;
|
regs->rip = entry;
|
||||||
regs->userrsp = stackpos & ~(15UL);
|
regs->userrsp = stackpos & ~15UL;
|
||||||
regs->rbp = regs->userrsp;
|
regs->rbp = regs->userrsp;
|
||||||
regs->cs = CS | RPL;
|
regs->cs = CS | RPL;
|
||||||
regs->ds = DS | RPL;
|
regs->ds = DS | RPL;
|
||||||
|
@ -81,4 +81,5 @@ namespace Sortix
|
||||||
regs->ss = 0x20 | 0x3;
|
regs->ss = 0x20 | 0x3;
|
||||||
regs->rflags = FLAGS_RESERVED1 | FLAGS_INTERRUPT | FLAGS_ID;
|
regs->rflags = FLAGS_RESERVED1 | FLAGS_INTERRUPT | FLAGS_ID;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // namespace Sortix
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include <sortix/kernel/kernel.h>
|
#include <sortix/kernel/kernel.h>
|
||||||
#include <sortix/kernel/process.h>
|
#include <sortix/kernel/process.h>
|
||||||
|
|
||||||
namespace Sortix
|
namespace Sortix {
|
||||||
{
|
|
||||||
void Process::ExecuteCPU(int argc, char** argv, int envc, char** envp,
|
void Process::ExecuteCPU(int argc, char** argv, int envc, char** envp,
|
||||||
addr_t stackpos, addr_t entry,
|
addr_t stackpos, addr_t entry,
|
||||||
CPU::InterruptRegisters* regs)
|
CPU::InterruptRegisters* regs)
|
||||||
|
@ -69,4 +69,5 @@ namespace Sortix
|
||||||
regs->ss = UDS | URPL;
|
regs->ss = UDS | URPL;
|
||||||
regs->eflags = FLAGS_RESERVED1 | FLAGS_INTERRUPT | FLAGS_ID;
|
regs->eflags = FLAGS_RESERVED1 | FLAGS_INTERRUPT | FLAGS_ID;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // namespace Sortix
|
||||||
|
|
Loading…
Add table
Reference in a new issue