Hey, I think I know the different between library calls and system calls,
thank you.

In fact some libraries (like the math library) contain almost no system
calls, and are safe to statically link to a kernel module.

However, if you are to read the original message that I replied to, the
person was asking about the pthread stuff in RTLinux and was confused
since he considered libpthread to be an entirely user-space thing.  I then
entertained the notion that using user libraries from kernel space is
impossible in the case of libraries that rely on system calls.

-Calin

 On Tue, 18 Sep 2001, Norm Dresner wrote:

> Not quite.
>
> There is a big difference  between "Library Calls"
> and "System Calls".  Some Library calls are
> nothing much more than calls to your own
> functions.  System Calls are what you're referring
> to.  There are library calls that are safe to make
> and library calls that call system calls that are
> not usable in a real-time module.  You can safely
> use some functions from libgcc that make no system
> calls -- many of the math functions that aren't
> compiled in-line are like that.  But you can't use
> the normal sprintf (because it uses malloc).
>
>     Norm
>
> ----- Original Message -----
> From: Calin A. Culianu <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 18, 2001 12:06 PM
> Subject: Re: [rtl] doubt regd library calls
>
>
> >
> > No library calls are being made in RTLinux, per
> se.  In fact, such a thing
> > would be quite difficult to do from kernel
> space.  You'd basically have to
> > mimic the entire system call interface in kernel
> space, and probably do
> > other magic just to be able to statically link a
> library in to a kernel
> > extension. Yikes!
> >
> > No, what actually happens is that RTLinux has a
> clean, and quite standard,
> > pthread interface to make the difficult task of
> writing multi-threaded
> > kernel modules somewhat easier and more
> manageable for people not used to
> > kernel programming.  The result is that you get
> those pthread_* functions
> > in kernel space, but that is just an interface.
> What happens under the
> > hood has nothing to do with user-space
> libraries.
> >
> > -Calin
> >
> > On Thu, 13 Sep 2001, A V wrote:
> >
> > > hi everybody,
> > >
> > > I have some doubt about library calls. I read
> in OS
> > > concepts that kernel space program should not
> make
> > > references to user space processes. Am i right
> ?
> > > In RTLniux, every realtime module runs in
> Kernel
> > > space. And we are making library calls to
> create
> > > threads which runs in User space. but
> according to OS
> > > concepts process running in Kernel space
> should not
> > > refer User space..
> > >   Please clarify my doubt..
> > >
> > > Regards
> > > Venkat
> > >
> > >
> > >
> > >
> __________________________________________________
> > > Terrorist Attacks on U.S. - How can you help?
> > > Donate cash, emergency relief information
> > >
> http://dailynews.yahoo.com/fc/US/Emergency_Informa
> tion/
> > >
> > > -- [rtl] ---
> > > To unsubscribe:
> > > echo "unsubscribe rtl" | mail
> [EMAIL PROTECTED] OR
> > > echo "unsubscribe rtl <Your_email>" | mail
> [EMAIL PROTECTED]
> > > --
> > > For more information on Real-Time Linux see:
> > > http://www.rtlinux.org/
> > >
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail
> [EMAIL PROTECTED] OR
> > echo "unsubscribe rtl <Your_email>" | mail
> [EMAIL PROTECTED]
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/
> >
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
>

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to