Commit Graph

11 Commits

Author SHA1 Message Date
Martin Stein
0b64328944 base: setup thread object for main thread in CRT0
For a main thread a thread object is created by the CRT0 before _main gets
called so that _main can already run in a generic environment that, e.g.,
catches stack overflows as a page-fault instead of corrupting the BSS.
Additionally dynamic programs have only one CRT0 - the one of the LDSO -
which does the initialization for both LDSO and program.

ref #989
2014-02-25 14:58:05 +01:00
Martin Stein
6aa0ab1bf9 hw: communicate UTCB dataspace through start info
To remap its UTCB to its context area later, a main thread needs
to know the according dataspace capability. This is done through
the start-info it receives from its creator at startup.

ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
42f51cd802 hw: use core-PD class to prevent singleton clashes
ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
77130a9404 hw: replace unsynchronized by unmanaged singleton
ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
2b8e5d7b19 hw: turn Native_utcb into restrictive class
fix #958
2013-12-03 08:33:24 +01:00
Martin Stein
dc8cbbf022 hw: rename Startup_msg in Start_info
ref #958
2013-12-03 08:33:24 +01:00
Martin Stein
b694045bd9 hw: get rid of Kernel::current_thread_id
Every thread receives a startup message from its creator through the initial
state of its userland thread-context. The thread-startup code remembers the
kernel name of the new thread by reading this message before the userland
thread-context gets polluted. This way, Kernel::current_thread_id becomes
unnecessary.

fix #953
2013-11-25 09:46:08 +01:00
Martin Stein
99c649c42f hw: simplify Kernel::new_thread
Don't set priority and label in platform thread and then communicate this
core object via Kernel::new_thread but communicate priority and label directly.
This way kernel doesn't need to know anymore what a platform thread is.

ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
210216e5e1 hw: simplify Kernel::start_thread
Instead of writing initial thread context to the platform-thread members
and then communicating this core object to kernel, core calls
Kernel::access_thread_regs first to initialize thread context and then
Kernel::start_thread without a platform-thread pointer. This way
the frontend as well as the backend of Kernel::start_thread loose
complexity and it is a first step to remove platform thread from the
vocabulary of the kernel.

ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
3b2590b65a hw: identify core threads through stack pointer
ref #953
2013-11-25 09:45:30 +01:00
Martin Stein
f4b46fe55c hw: move kernel.cc to core/kernel/
ref #935
2013-11-14 19:57:30 +01:00