On Fri, Aug 27, 2010 at 1:23 PM, James Bond <jamesbond.2k.g@xxxxxxxxx> wrote: > > Hi, > I am new to kernel development. > So after being able to have some basic understand of some things I just went through source code. > I was going through a file known as > linux-2.6.34/kernel/timer.c and found following code. > I want to understand what is it doing. > What should I be reading to be able to understand it? > > static inline void > timer_set_base(struct timer_list *timer, struct tvec_base *new_base) > { > timer->base = (struct tvec_base *)((unsigned long)(new_base) | > tbase_get_deferrable(timer->base)); > } > > James, You seem to be asking about the use of the standard C keywords / tokens: static, inline, and void associated with a function declaration. If so, any semi-advanced book on the C programming language should be able to address your questions thoroughly. You should not need to find a kernel specific book. In fact, most linux kernel books will not address questions related to core C language constructs such as those. My basic advice is you should become proficient with the C language as a user space programmer before delving into the kernel. Many places in the kernel use advance C constructs which even advanced user space C programmers find hard to grasp. Questions about those types of usage are very appropriate for this list and will often be better addressed in kernel specific books I believe. Good Luck Greg -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ