summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/Start.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Library/Userland/Start.cpp')
-rw-r--r--Source/Library/Userland/Start.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/Library/Userland/Start.cpp b/Source/Library/Userland/Start.cpp
index 4c5c559..032450d 100644
--- a/Source/Library/Userland/Start.cpp
+++ b/Source/Library/Userland/Start.cpp
@@ -16,10 +16,6 @@ VirtualTerminal invt(0), outvt(0);
int main(const Vector<String>& args);
-void doExit(u32int v) {
- asm volatile("int $66" : : "a"(v));
-}
-
extern "C" void start() {
//Call static constructors
u32int i = 0;
@@ -29,8 +25,8 @@ extern "C" void start() {
heap.create(0x40000000, 0x00040000, 0x00004000); //Initially create a 256ko heap with 16ko index
invt = VirtualTerminal::getIn(); outvt = VirtualTerminal::getOut();
- if (!invt.valid()) doExit(1);
- if (!outvt.valid()) doExit(2);
+ if (!invt.valid()) threadFinishedSyscall(1);
+ if (!outvt.valid()) threadFinishedSyscall(2);
u32int argc = Process::get().argc();
Vector<String> args(argc);
@@ -43,7 +39,7 @@ extern "C" void start() {
((void (*)(void))*call)();
}
- doExit(r);
+ threadFinishedSyscall(r);
}
namespace Mem {