Commit 4b681222 by malcolm

Switch function

parent 3704530e
Showing with 21 additions and 0 deletions
...@@ -57,4 +57,6 @@ typedef struct ...@@ -57,4 +57,6 @@ typedef struct
char name[32]; char name[32];
}__attribute__((packed)) process; }__attribute__((packed)) process;
extern void switch(context** old, context* new);
#endif #endif
global switch
switch:
mov eax, [esp+4]
mov edx, [esp+8]
push ebp
push ebx
push esi
push edi
mov [eax], esp
mov esp, edx
pop edi
pop esi
pop ebx
pop ebp
ret
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment