[project] Lose the battle between tabs & spaces
I'm a tabs guy. I like tabs, it's an elegant way to represent indentation instead of brute-forcing it. But I have to admit that the world seems to be going towards spaces, and tooling tends not to play nice with tabs. So here we go, changing the whole repo to spaces since I'm getting tired of all the inconsistent formatting.
This commit is contained in:
committed by
Justin C. Miller
parent
d36b2d8057
commit
8f529046a9
@@ -10,48 +10,48 @@ namespace syscalls {
|
||||
j6_status_t
|
||||
thread_create(void *rip, j6_handle_t *handle)
|
||||
{
|
||||
thread &parent = thread::current();
|
||||
process &p = parent.parent();
|
||||
thread &parent = thread::current();
|
||||
process &p = parent.parent();
|
||||
|
||||
thread *child = p.create_thread();
|
||||
child->add_thunk_user(reinterpret_cast<uintptr_t>(rip));
|
||||
*handle = child->self_handle();
|
||||
child->clear_state(thread::state::loading);
|
||||
child->set_state(thread::state::ready);
|
||||
thread *child = p.create_thread();
|
||||
child->add_thunk_user(reinterpret_cast<uintptr_t>(rip));
|
||||
*handle = child->self_handle();
|
||||
child->clear_state(thread::state::loading);
|
||||
child->set_state(thread::state::ready);
|
||||
|
||||
log::debug(logs::task, "Thread %llx spawned new thread %llx, handle %d",
|
||||
parent.koid(), child->koid(), *handle);
|
||||
log::debug(logs::task, "Thread %llx spawned new thread %llx, handle %d",
|
||||
parent.koid(), child->koid(), *handle);
|
||||
|
||||
return j6_status_ok;
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_exit(int32_t status)
|
||||
{
|
||||
thread &th = thread::current();
|
||||
log::debug(logs::task, "Thread %llx exiting with code %d", th.koid(), status);
|
||||
th.exit(status);
|
||||
thread &th = thread::current();
|
||||
log::debug(logs::task, "Thread %llx exiting with code %d", th.koid(), status);
|
||||
th.exit(status);
|
||||
|
||||
log::error(logs::task, "returned to exit syscall");
|
||||
return j6_err_unexpected;
|
||||
log::error(logs::task, "returned to exit syscall");
|
||||
return j6_err_unexpected;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_pause()
|
||||
{
|
||||
thread &th = thread::current();
|
||||
th.wait_on_signals(-1ull);
|
||||
return j6_status_ok;
|
||||
thread &th = thread::current();
|
||||
th.wait_on_signals(-1ull);
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
thread_sleep(uint64_t til)
|
||||
{
|
||||
thread &th = thread::current();
|
||||
log::debug(logs::task, "Thread %llx sleeping until %llu", th.koid(), til);
|
||||
thread &th = thread::current();
|
||||
log::debug(logs::task, "Thread %llx sleeping until %llu", th.koid(), til);
|
||||
|
||||
th.wait_on_time(til);
|
||||
return j6_status_ok;
|
||||
th.wait_on_time(til);
|
||||
return j6_status_ok;
|
||||
}
|
||||
|
||||
} // namespace syscalls
|
||||
|
||||
Reference in New Issue
Block a user