1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-27 11:24:34 -05:00
kernel/kernelmq/tasks.asm

20 lines
312 B
NASM

#include "config.h"
[GLOBAL tasks_switch_to_user]
tasks_switch_to_user:
mov ebx, [esp+4]
mov ax, GDT_USER_DS_SELECTOR
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov eax, esp
push GDT_USER_DS_SELECTOR
push eax
pushf
push GDT_USER_CS_SELECTOR
push ebx
iret