context switching between two functions
This commit is contained in:
@@ -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() {}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user