1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

Make syscall invocations look pleasant.

Old: Syscall::invoke(Syscall::SC_foo, (dword)arg1, (dword)arg2)
New: syscall(SC_foo, arg1, arg2)
This commit is contained in:
Andreas Kling 2018-12-21 03:02:06 +01:00
parent 36bd53b36a
commit 3a0a8848fb
13 changed files with 75 additions and 72 deletions

View file

@ -23,10 +23,10 @@ extern "C" int _start()
int status = 254;
int argc;
char** argv;
int rc = Syscall::invoke(Syscall::SC_get_arguments, (dword)&argc, (dword)&argv);
int rc = syscall(SC_get_arguments, &argc, &argv);
if (rc < 0)
goto epilogue;
rc = Syscall::invoke(Syscall::SC_get_environment, (dword)&environ);
rc = syscall(SC_get_environment, &environ);
if (rc < 0)
goto epilogue;
status = main(argc, argv);
@ -35,7 +35,7 @@ extern "C" int _start()
fflush(stderr);
epilogue:
Syscall::invoke(Syscall::SC_exit, status);
syscall(SC_exit, status);
// Birger's birthday <3
return 20150614;