12 lines
254 B
C++
12 lines
254 B
C++
|
#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));
|
||
|
}
|