Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System calls Implementation

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 ?

like image 590
user1458471 Avatar asked Dec 11 '22 21:12

user1458471


1 Answers

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.

See also the calling conventions and Application Binary Interface specification relevant to your system. For x86-64 it is here.

like image 129
Basile Starynkevitch Avatar answered Dec 14 '22 23:12

Basile Starynkevitch