Luna/kernel/src/thread/Task.cpp

12 lines
254 B
C++
Raw Normal View History

#include "thread/Task.h"
#include "std/string.h"
void set_context_from_task(Task& task, Context* ctx)
{
memcpy(ctx, &task.regs, sizeof(Context));
}
void get_context_to_task(Task& task, Context* ctx)
{
memcpy(&task.regs, ctx, sizeof(Context));
}