Skip to content
Snippets Groups Projects
Commit 68c8cad3 authored by Thierno souleymane Bah's avatar Thierno souleymane Bah
Browse files

fix(switch_to_ctx function simplfied by deleting some useless lines)

parent 65e008b6
No related branches found
No related tags found
No related merge requests found
...@@ -49,31 +49,18 @@ void switch_to_ctx(ctx_t *pctx) ...@@ -49,31 +49,18 @@ void switch_to_ctx(ctx_t *pctx)
"\n\t" "\n\t"
"movl %%ebp, %1" "movl %%ebp, %1"
: "=r"(current_ctx->esp), "=r"(current_ctx->ebp)); : "=r"(current_ctx->esp), "=r"(current_ctx->ebp));
current_ctx = pctx;
// Basculer vers pctx
asm("movl %0, %%esp"
"\n\t"
"movl %1, %%ebp "
:
: "r"(pctx->esp), "r"(pctx->ebp));
} }
else
{
current_ctx = pctx; current_ctx = pctx;
asm("movl %%esp, %0" asm("movl %%esp, %0"
"\n\t" "\n\t"
"movl %%ebp, %1" "movl %%ebp, %1"
: "=r"(current_ctx->esp), "=r"(current_ctx->ebp)); :
} : "r"(current_ctx->esp), "r"(current_ctx->ebp));
if (current_ctx->status == CTX_INIT) if (current_ctx->status == CTX_INIT)
{
start_ctx(); start_ctx();
} }
}
void start_ctx() void start_ctx()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment