If a user application makes a system call , a software interrupt/exception is triggered. How can I see the source code for generating a software interrupt ?
It is explained in Linux Assembly Howto. And you should read wikipedia syscall page (and also about VDSO), and also intro(2) & syscalls(2) man pages. See also this answer and this one. Look also inside Gnu Libc & musl-libc source code. Learn also to use strace to find out which syscalls are made by a given command or process.
strace
See also the calling conventions and Application Binary Interface specification relevant to your system. For x86-64 it is here.
2.1m questions
2.1m answers
60 comments
57.0k users