Tuesday, May 27, 2008

My First Kernel Program

This blog post doesn't actually share any techniques.

If "modification" is not included, I just wrote my first Linux kernel program few days ago. It is a ring-buffer-duo program for buffering periodical data between a user-mode process and another kernel thread.

It is a small task, but means a lot to me. It is the first complete kernel program I've ever written. I learned how to build a Linux kernel module alone the way. And made a unit-test for this little program using both user-space and kernel-space ways.

Though trivial and easy. It took me some time to read document and write it from scratch. (About 1.5 days, including unit-test.) I hope I can do it faster with this experience.

Reference: Kernel Driver Model

No comments: