/* Copyright (C) 2021,2022 fef . All rights reserved. */ #pragma once #define _ARCH_SCHED_H_ #include #define KERN_STACK_PAGES 2 #define KERN_STACK_SHIFT (PAGE_SHIFT + KERN_STACK_PAGES - 1) #define KERN_STACK_SIZE (1 << KERN_STACK_SHIFT) #ifndef _ASM_SOURCE #include #include #ifdef __x86_64__ #include #else #include #endif /** * @brief Arch dependent low level task switch routine (x86 version). * `new` must not be equal to `old` or the whole thing probably blows up. * * @param new TCB of the new task we are switching to * @param old TCB of the old task we are switching from */ extern void arch_switch_to(tcb_t *new, tcb_t *old); #endif /* not _ASM_SOURCE */