[kernel] Clean up syscall code

This is a minor refactor including:
- Removing old commented-out syscall_dispatch function
- Removing IA32_EFER syscall-enable flag setting (this is done by the
  bootloader now)
- Moving much logging from inside process/thread syscalls to the 'task'
  log area, allowing for turning the 'syscall' area down to info by
  default.
This commit is contained in:
Justin C. Miller
2021-01-23 20:37:20 -08:00
parent 16b9d4fd8b
commit 211a3c2358
5 changed files with 10 additions and 91 deletions

View File

@@ -19,7 +19,7 @@ thread_create(void *rip, j6_handle_t *handle)
child->clear_state(thread::state::loading);
child->set_state(thread::state::ready);
log::debug(logs::syscall, "Thread %llx spawned new thread %llx, handle %d",
log::debug(logs::task, "Thread %llx spawned new thread %llx, handle %d",
parent.koid(), child->koid(), *handle);
return j6_status_ok;
@@ -29,10 +29,10 @@ j6_status_t
thread_exit(int32_t status)
{
thread &th = thread::current();
log::debug(logs::syscall, "Thread %llx exiting with code %d", th.koid(), status);
log::debug(logs::task, "Thread %llx exiting with code %d", th.koid(), status);
th.exit(status);
log::error(logs::syscall, "returned to exit syscall");
log::error(logs::task, "returned to exit syscall");
return j6_err_unexpected;
}
@@ -48,7 +48,7 @@ j6_status_t
thread_sleep(uint64_t til)
{
thread &th = thread::current();
log::debug(logs::syscall, "Thread %llx sleeping until %llu", th.koid(), til);
log::debug(logs::task, "Thread %llx sleeping until %llu", th.koid(), til);
th.wait_on_time(til);
return j6_status_ok;