Only minor changes are required to make the kernel 64 bit compatible.
Most of the changes are either DEBUG/printf formatting or different types for void pointer casting.
The only other change is the type of the `data` member in priority_queue_node_t, as `data` must be able to store a pointer.
For current architectures, the assumption `sizeof(unsigned int) == sizeof(void *)` holds, but not for 64 bit.
Therefore, the type is changed to `uintptr_t', which has the same size for the current architectures, but can also store a pointer in 64 bits.
Apparently clang doesn't like static variables / functions being accessed called
from inline function (-Wstatic-in-inline). This commit results in the same
binary being generated while making clang happy.
Replace accesses to `sched_active_thread`, `sched_active_pid`, and
`sched_threads` with `thread_get_active()`, `thread_get_active_pid()`, and
`thread_get_unchecked()` where sensible.
- Introduced enum type `thread_state_t` to replace preprocessor macros
- Moved thread states to `sched.h` for two reasons:
a) Because of the interdependencies of `sched.h` and `thread.h` keeping it in
`thread.h` would result in ugly code.
b) Theses thread states are defined from the schedulers point of view, so it
actually makes senses to have it defined there