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

@@ -0,0 +1,14 @@
#include "log.h"
#include "scheduler.h"
namespace syscalls {
void
message(const char *message)
{
auto &s = scheduler::get();
auto *p = s.current();
log::info(logs::syscall, "Message[%d]: %s", p->pid, message);
}
} // namespace syscalls