git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Rationale behind 'extern' on protypes in .h files
@ 2013-12-22 15:51 Ravi Shekhar Jethani
  2013-12-22 17:11 ` Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Ravi Shekhar Jethani @ 2013-12-22 15:51 UTC (permalink / raw)
  To: git

Hi,
I am a C & Data Structure teacher at at an institute. Up until now I
have only written classroom type C code. I always had interest in
operating systems especially Linux Kernel but never got into anything
just passively followed 'lwn.net', 'dr dobbs magazine' etc.

But the series '30 Linux Kernel Developers in 30 Weeks' on 'linux.com'
has really pushed me over the edge and  I have this new found interest
towards Linux and C. As these articles suggest that I should have a
good experience in user space before I can even touch the kernel. So
to get a feel of how actual real world C projects look like I have
taken two excellent projects as my reference 'Git' and 'libvirt'. Also
'Linux Formrnal Scratch' to get started towards Linux internals.

Although I have a good understanding of the basic/advanced concepts
like pointers, memory management etc but many concepts like good error
handling mechanism, unit testing, build systems etc. were always
blurry but I know that this is just a start towards a long journey
towards Linux Kernel.


Now, my real question :
1) I cannot understand the reason behind making function prototypes as
extern. What purpose does this serve? AFAIK we put definition in a .c
file and the prototype in a .h thats it.

2) Why are some  prototypes in some of the .h file are extern and
others are not?

Thank you guys for reading through. Any suggestions are humbly welcome.
Ravi S. Jethani

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-23 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-22 15:51 Rationale behind 'extern' on protypes in .h files Ravi Shekhar Jethani
2013-12-22 17:11 ` Stefan Beller
2013-12-22 18:26   ` Jed Brown
2013-12-23 15:24     ` Ravi Shekhar Jethani
2013-12-23 16:59       ` Jed Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).