mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-07 03:15:47 -04:00
22 lines
656 B
C++
22 lines
656 B
C++
//=======================================================================
|
|
// Copyright Baptiste Wicht 2013-2014.
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
//=======================================================================
|
|
|
|
#ifndef USER_SYSTEM_HPP
|
|
#define USER_SYSTEM_HPP
|
|
|
|
#include <types.hpp>
|
|
|
|
//TODO Put the function in noreturn once the system call is written
|
|
void exit(size_t return_code){
|
|
asm volatile("mov rax, 0x666; mov rbx, %0; int 50"
|
|
: //No outputs
|
|
: "r" (return_code)
|
|
: "rax", "rbx");
|
|
}
|
|
|
|
#endif
|