mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Start working on memory-mapped files.
First of all, change sys$mmap to take a struct SC_mmap_params since our sycsall calling convention can't handle more than 3 arguments. This exposed a bug in Syscall::invoke() needing to use clobber lists. It was a bit confusing to debug. :^)
This commit is contained in:
parent
41a751c90c
commit
fdbd9f1e27
14 changed files with 82 additions and 26 deletions
|
@ -8,7 +8,7 @@ extern "C" void syscall_entry(RegisterDump&);
|
|||
extern "C" void syscall_ISR();
|
||||
extern volatile RegisterDump* syscallRegDump;
|
||||
|
||||
asm(
|
||||
asm volatile(
|
||||
".globl syscall_ISR \n"
|
||||
"syscall_ISR:\n"
|
||||
" pusha\n"
|
||||
|
@ -93,7 +93,7 @@ static DWORD handle(RegisterDump& regs, DWORD function, DWORD arg1, DWORD arg2,
|
|||
case Syscall::SC_waitpid:
|
||||
return current->sys$waitpid((pid_t)arg1, (int*)arg2, (int)arg3);
|
||||
case Syscall::SC_mmap:
|
||||
return (dword)current->sys$mmap((void*)arg1, (size_t)arg2);
|
||||
return (dword)current->sys$mmap((const SC_mmap_params*)arg1);
|
||||
case Syscall::SC_munmap:
|
||||
return current->sys$munmap((void*)arg1, (size_t)arg2);
|
||||
case Syscall::SC_gethostname:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue