how can i view the source code of my distro? i mean, do we need that if we were to create a new system call?
btw, i'm using centos 5.6
thank you in advance
how can i view the source code of my distro?
I have not used CentOS, but in the Linux distros I have used, the kernel source code is generally found in the directory pointed to by the /usr/src/linux symlink.
do we need that if we were to create a new system call?
I would say have to say "No". For system calls, you would need to concentrate on the /usr/include/sys directory, and especially the unistd.h header file to be found in that directory.
Have a look at this article: http://en.wikipedia.org/wiki/Unistd.h
You can enable the source code repository and download/install the kernel source code with the yum command. Alternatively, you can download the kernel source code RPM file from a CentOS mirror site and install it directly, again with either yum or rpm commands. And yes, you will need the kernel source if you are going to add your own system call. I would strongly suggest that you do some studying of how to configure, build, and install custom kernels. There are a lot of documentation, manuals, etc on both the kernel.org and tldp.org (The Linux Documentation Project) web sites that will help a lot.
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.