QUestion on C language

Greg Freemyer greg.freemyer at
Wed Dec 22 16:31:15 EST 2010

On Wed, Dec 22, 2010 at 12:43 PM, bhuvan gupta <bhuvangu at> wrote:
> Respected sir,
> I am Bhuvan Gupta, a B.Tech student.(got your id from yours " USB LED driver
> - 1.1 ")
> )
> With due respect, I humbly request you to please throw some light on to
> below written question. i will highly appreciate your efforts.
> [1] when we use C language,we use diferent library to do different thing.

Unless I totally misunderstand, the Linux Kernel does not have any
libraries.  It's core is a monolithic program to which modules can be
loaded.  To think of it as a library is not instructive in my mind.

> As
> also in your case you use module.h,init.h etc
> but how to write this library , in what language they are written in as
> standard ANSI C  has round about 32 keywords ?

Again the kernel core is not a library, but the linux kernel core is
primarily written in C, but some of the functions are indeed in

Note that ANSI C is not precisely the language in question.  Many GCC
extensions are used.  One example is the keyword, "unlikely".

> what should i read and learn to the related topic .
> please suggest something

The GCC manuals are a necessary reference as well.  You can find them online.

> (I do have knowledge of Assembly).

In general you can avoid most assembly if you are not porting the
kernel to a new cpu/MB/chipset.

> please help,this question making me beacen
> it will be honour if you reply.
> thank you
> Bhuvan Gupta

Good Luck

More information about the Kernelnewbies mailing list