refactor: one more step towards arch-agnostic design
[lunaix-os.git] / lunaix-os / arch / i386 / includes / sys / abi.h
index f610b93465b80a0131cbadc032570c846e9a53b6..482d6f1f06bd179c5a23969caf10777f6c6ecaa1 100644 (file)
@@ -31,6 +31,8 @@
                  "r"(pc)                                                       \
                  : "eax", "memory");
 
+#define switch_context(process) asm volatile("jmp switch_to\n" ::"a"(process));
+
 #define push_arg1(stack_ptr, arg) *((typeof((arg))*)(stack_ptr)--) = arg
 #define push_arg2(stack_ptr, arg1, arg2)                                       \
     {                                                                          \