Results 1 to 3 of 3
hai friend,
I am new to driver programming. I want to develop a device driver program in Linux.Anyone help me How to start and give the short description about the ...
- 03-29-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 18
Execution flow of device driver
hai friend,
I am new to driver programming. I want to develop a device driver program in Linux.Anyone help me How to start and give the short description about the flow of device driver works(i.e. which routine calls first and which routine calls next,like that..)
Thanks in advance.
with regards
vivek.
- 03-31-2008 #2Just Joined!
- Join Date
- Jun 2006
- Posts
- 29
Take a sample device driver and use printk messages in each function/syscall like read/write/open/close.
Flow of execution will shown in #dmesg
- 03-31-2008 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 2
Hi Vivek,..
There is no compulsory program flow in a device driver like a normal c program. According to the calls, the respective functions will get invoked. First while inserting the module the INIT_MODULE will get called. Then if you try to read from a device the READ function will get invoked. You can write a driver without a READ call also. It will have only have WRITE function to write into some device.
Still if want to know about the program flow means you can use $ : strace <filename>
Rgds
Rajez


Reply With Quote
