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.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 ? what should i read and learn to the related topic . please suggest something (I do have knowledge of Assembly). please help,this question making me beacen it will be honour if you reply. thank you Bhuvan Gupta India
Hi... On Thu, Dec 23, 2010 at 00:43, bhuvan gupta <bhuvangu@gmail.com> wrote:
With due respect, I humbly request you to please throw some light on to below written question. i will highly appreciate your efforts.
You're a bit humble and polite than your predecessors :D but still, OOT is OOT
but how to write this library , in what language they are written in as standard ANSI C has round about 32 keywords ?
What do you mean by 32 keywords? Writing C library is like writing normal code... just watch out, we're target kernel space here. You can't use normal libc function....so for example instead printf, you have to use printk() or similar. And no floating point number operation... NB: assuming you wanna made user space DSO (Dynamic Shared Object), is just the code would be made as PIC (AFAIK it means Position Independent Code). Google for ld (linker) to find out more about it. here's one: http://www.gentoo.org/proj/en/hardened/pic-internals.xml -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On Wed, Dec 22, 2010 at 12:43 PM, bhuvan gupta <bhuvangu@gmail.com> 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 assembly. 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 Greg
On 23 Dec 2010, at 01:43, bhuvan gupta <bhuvangu@gmail.com> 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.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 ? what should i read and learn to the related topic .
AFAIK, the kernel does not involve heavy use of any library. Talking from a non kernel view, you know that .h files are header files. You can google that. The language is still C as they're C headers. What do you mean when you say "as standard ANSI C has round about 32 keywords" ?
please suggest something
(I do have knowledge of Assembly).
please help,this question making me beacen
it will be honour if you reply.
thank you Bhuvan Gupta India
Cheers - Alex.
2010/12/23 Alex John <alex@archeleus.com>:
On 23 Dec 2010, at 01:43, bhuvan gupta <bhuvangu@gmail.com> 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.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 ? what should i read and learn to the related topic .
AFAIK, the kernel does not involve heavy use of any library. Talking from a non kernel view, you know that .h files are header files. You can google that. The language is still C as they're C headers. What do you mean when you say "as standard ANSI C has round about 32 keywords" ? I think his meaning is Standard ANSI C recognizes the following 32 keywords auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while
Of course, as we know, kernel compilation depends on compiler "GCC" for much more compiler extensions.
please suggest something (I do have knowledge of Assembly).
please help,this question making me beacen it will be honour if you reply. thank you Bhuvan Gupta India
Cheers - Alex. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Best Regards Lin
participants (5)
-
Alex John -
bhuvan gupta -
Greg Freemyer -
Mulyadi Santosa -
Pei Lin