Merge branch 'main' of gitlab.ibr.cs.tu-bs.de:vss/teaching/ws25/v_bsb2/stubsmi

This commit is contained in:
2026-02-06 23:09:43 +01:00
31 changed files with 402 additions and 3388 deletions

View File

@@ -38,7 +38,6 @@ class Thread {
// alignas(16) char reserved_stack_space_user[STACK_SIZE];
alignas(16) char reserved_stack_space_isr[STACK_SIZE];
protected:
/*! \brief Context of the thread, used for saving and restoring the register
* values when context switching.
*/
@@ -59,6 +58,7 @@ class Thread {
* \param param1 Thread to be started
* \param param2 Second parameter (will be used later)
* \param param3 Third parameter (will be used later)
*
*/
static void kickoff(uintptr_t param1, uintptr_t param2, uintptr_t param3);
@@ -72,7 +72,7 @@ class Thread {
void* operator new ( size_t count )noexcept;
/*! \brief Unique thread id */
const size_t id;
const int id;
@@ -81,6 +81,13 @@ class Thread {
*/
volatile bool kill_flag;
// Naively moving or copying esp. the (user) stack of a thread would be a
// bad idea:
Thread(const Thread&) = delete;
Thread(Thread&&) = delete;
Thread& operator=(const Thread&) = delete;
Thread& operator=(Thread&&) = delete;
/*! \brief Constructor
* Initializes the context using \ref prepareContext with the thread's
* stack space.