context switching between two functions

This commit is contained in:
Eggert Jung
2025-06-17 13:56:33 +02:00
parent ab76afa30a
commit c1145d28f8
4 changed files with 46 additions and 29 deletions

View File

@@ -6,17 +6,18 @@
typedef void (*kickoff_t)(void*);
void Thread::kickoff(Thread* object) {
//Guard::leave();
object->action(); }
Thread::Thread(void* tos) {
volatile bool kill_flag;
Context context;
Thread* queue_link;
object->action();
}
void Thread::resume(Thread* next) { (void)next; }
Thread::Thread(void* tos) {
}
void Thread::go() {}
void Thread::resume(Thread* next) {
}
void Thread::go() {
}
void Thread::action() {}

View File

@@ -36,9 +36,12 @@ class Thread {
*
* \param object Thread to be started
*/
/// \todo(14) Implement Method
static void kickoff(Thread* object);
volatile bool kill_flag;
Context context;
Thread* queue_link;
public:
/*! \brief Marker for a dying thread
*/