[plug] kernel programming
Shayne O'Neill
shayne at guild.murdoch.edu.au
Wed Mar 24 15:39:39 WST 2004
perhaps it would be better to put it into some sort of shared memory space
(with apropriate locking) and share it that way.
The header files from libc wont work, cos libc lives in user space which
is a quite different domain to kernel space.
------------------------------------
"Must not Sleep! Must warn others!"
-Aesop.
Shayne O'Neill. Indymedia. Fun.
http://www.perthimc.asn.au
On Tue, 23 Mar 2004, Parag Nemade wrote:
> hello Peter,
> i require fopen cause i am calculating a
> string value and storing it in a file for temporary
> period and reading it by other file in kernel.
> can i copy all header files from libc to kernel
> include directory?
> I am using a red hat Linux 9.0 with kernel 2.4.
> Regards,
> Parag.
>
>
> --- Peter F Bradshaw <pfb at exadios.com> wrote:
> > Hi Parag;
> >
> > If you are talking about the fopen() function call
> > then you are talking
> > about libc - and libc is not avaliable in the
> > kernel. In fact only those
> > functions defined in the kernel (or a module) are
> > avaliable.
> >
> > Kernel programming and user mode programming are
> > quite different - the
> > enviroment and the implicit assumptions are
> > different. Its hard to know
> > why you would need to use fopen() in the kernel but
> > if you really do
> > then you may want to address what ever you are
> > trying to do by writing a
> > kernel and corresponding user mode components and
> > doing the nasty stuff
> > in user mode. There are a few ways to communicate -
> > probably using the
> > /proc file system is easiest (might be messy though
> > :-).
> >
> > You did not say which kernel version you are talking
> > about but for 2.4
> > take a look at:
> >
> > http://www.linux.org.au/LDP/LDP/lkmpg/index.html
> > and
> > http://www.linux.org.au/LDP/LDP/lki/index.html
> >
> > On Tue, 23 Mar 2004, Parag Nemade wrote:
> >
> > > hello friends,
> > > i want to modify kernel source code by adding my
> > own C
> > > files in net protocol stack but i found that some
> > C
> > > functions are not supported by kernel include
> > > directory that is fopen is not found in any of
> > header
> > > files. what can i do? Also while compiling my own
> > C
> > > files with kernel files i got warnings that
> > implicit
> > > declaration of function and function declaration
> > isn't
> > > a prototype how can i solve it?
> > > Parag.
> > >
> >
> > Cheers
> >
> > --
> > Peter F Bradshaw, pfb at exadios.com, ICQ 75431157
> > (exadios).
> > http://www.exadios.com
> > PGP public key at
> > http://www.exadios.com/public_key.html
> > "I love truth, and the way the government still uses
> > it occasionally to
> > keep us guessing. " - Sam Kekovich.
> > _______________________________________________
> > PLUG discussion list: plug at plug.linux.org.au
> >
> http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
> > Committee e-mail: committee at plug.linux.org.au
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> _______________________________________________
> PLUG discussion list: plug at plug.linux.org.au
> http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>
More information about the plug
mailing list