Submitted by engwael26 on Wed, 14/09/2005 - 06:53.
( categories: )

Hi All, I need to add my own system call to be able to handel the Interrupts in the User Space. I need to know the right sequence of steps to add a new System Call and Recompile Kernel. Taking in Consedration that I'm using: Kernel 2.6.13 GCC 4.1 Fedora Core 4

Please Help me.

Thank you.


http://www.linuxgazette.com/n

Ahmed Hashim's picture

http://www.linuxgazette.com/node/9793

http://www.tldp.org/LDP/lpg/index.html

i didn't b4 but i hope that can help


----
Ahmed Hashim
Hacker from the Earth

Well to do anything related t

phaeronix's picture

Well to do anything related to the kernel you have to learn about the linux kernel. I have gathered the following from reading LKML:

http://lwn.net/Kernel/LDD3

http://www.amazon.com/exec/obidos/tg/detail/-/0672327201/103-6781097-8768660?v=glance

http://www.amazon.com/exec/obidos/tg/detail/-/0596002130/ref=pd_sim_1/103-6781097-8768660?%5Fencoding=UTF8&v=glance

http://www.kernelnewbies.org

http://rlove.org/kernel_book

http://www.kernelnewbies.org/books.php3

here's another useful quote from LKML :

"Start with head.S in /arch/i386 and follow the code from there.

That's where everything begins."

"in 2.6.13 here it's in /arch/i386/kernel/head.S but nothing find couldn't handle."

Personally I think any IRQ handling should be left to the kernel and the appropriate module handling the hardware that generated the IRQ. In userspace you wait for the kernel to tell you that something happened ( hotplug event ? over netlink for example ? ) and act accordingly.

However I haven't studied the kernel code deeply yet. I will do so when I have time , therefore just check a simple example of how stuff is done in the kernel ( the COM port handling for example ) and follow it.

I hope this helps.

It's never over till it's over.

Thank You

Thank you for your help. I'll try to access these pages and tell you the result when I'am done

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.