Work only on X86-64, tested only on Ubuntu 20.04
sudo apt -y install fasm
make
- Main functiomality for switching context implemented in
*.asm
file - Instead of interrupts using mechanism of signals with signal
SIGALARM
- For generating signals used systemcall
setitimer
- Handler of signal acts as function, which call switch function written in assembly
- the main thing to understand is that the handler work in thread context
- Don't work custom spinlock, calling of function
lock
break down stack of thread - Don't work user input from console