I searched before I asked a question and found this post.
Difference between Syscall and Traps
But this is not clear to me.
Many books explain syscall and trap at once.
In another book said, syscall is a kind of trap.
Someone says that they generate a trap through a syscall, which causes chaos for me.
Aren't both syscall and trap are software interrupts?
I understood that the program need something but It can only work in kernel mode.
So requests syscall and through the trap the operating system takes the cpu.
It is obvious that interrupts occur during the first syscall.
But interrupt occur again during the trap phase after syscall? I'm confused.