Improve syscall definitions

- Allow constant id specification
- Define function signature in SYSCALL macro
- Move implementation into src/kernel/syscalls/*.cpp
This commit is contained in:
Justin C. Miller
2019-04-02 23:14:52 -07:00
parent 11a53e792f
commit 8375870af6
13 changed files with 173 additions and 97 deletions

View File

@@ -6,6 +6,7 @@ extern "C" {
int32_t fork();
void sleep(uint64_t til);
void debug();
void message(const char *msg);
int main(int, const char **);
}
@@ -15,6 +16,7 @@ int
main(int argc, const char **argv)
{
int32_t pid = getpid();
message("hello from nulldrv!");
//int32_t child = fork();
//debug();
for (int i = 1; i < 5; ++i)