How to Implement Multiple Periodic Timers in Linux Kernel

Here we’ll see how to implement a timer module in Linux kernel that will allow users to create multiple periodic timers at the same time. Kernel already has a timer module that allows us to create multiple timers but the timers are not periodic. Using that module we get timeout signal (callback function) only once, after … Continue reading “How to Implement Multiple Periodic Timers in Linux Kernel”

How to Compile Linux Kernel Module

Linux has a build infrastructure called “kbuild” to build in-tree and out-of-tree kernel modules. Here I’ll focus on external or out-of-tree kernel module compilation. Linux “kbuild” infrastructure is fairly complicated, better not to go into that. Here we’ll see how to create a Makefile to compile one or more source files into an external kernel … Continue reading “How to Compile Linux Kernel Module”

Why Function Pointers are Used in C

During program execution, we know that variables are stored in the physical memory (RAM) in the process’ address space. One variable can be stored in multiple bytes. The address of the first byte is called the pointer of the variable. This pointer can be assigned to another (pointer type) variable. The original variable can be … Continue reading “Why Function Pointers are Used in C”

Where to Use Call by Reference in C

If you compare two parameter passing mechanisms, Call by Value and Call by Reference, in C programming language, Call by Value is much simpler in syntax and easy to understand. Then why should we use Call by Reference? Here we will try figure out what we can do with Call by Reference but can not do … Continue reading “Where to Use Call by Reference in C”

Call by Value vs Call by Reference in C

Call by Value and Call by Reference are related to the way we pass parameters in time of calling C functions. In Call by Value mechanism, we pass the VALUE of a variable to a function. The called function can use the value but won’t be able to change the value of the original variable. … Continue reading “Call by Value vs Call by Reference in C”

0
0
0
0
0
0