Thread: Add init_regs_user()
This commit is contained in:
parent
7efb79dd26
commit
2600acc96c
@ -34,6 +34,14 @@ void Thread::init_regs_kernel()
|
|||||||
regs.rflags = 1 << 9; // IF (Interrupt enable flag)
|
regs.rflags = 1 << 9; // IF (Interrupt enable flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Thread::init_regs_user()
|
||||||
|
{
|
||||||
|
memset(®s, 0, sizeof(Registers));
|
||||||
|
regs.cs = 0x18 | 3;
|
||||||
|
regs.ss = 0x20 | 3;
|
||||||
|
regs.rflags = 1 << 9; // IF (Interrupt enable flag)
|
||||||
|
}
|
||||||
|
|
||||||
void Thread::set_arguments(u64 arg1, u64 arg2, u64 arg3, u64 arg4)
|
void Thread::set_arguments(u64 arg1, u64 arg2, u64 arg3, u64 arg4)
|
||||||
{
|
{
|
||||||
regs.rdi = arg1;
|
regs.rdi = arg1;
|
||||||
|
Loading…
Reference in New Issue
Block a user