Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost API System or Library Calls ..
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-11-06 11:18:41


On 11/6/2013 10:21 AM, Rahul Mathur wrote:
>
> AFAIK system call is how a program requests a service from an OS kernel
> (viz. it's an interface between user-level code and the kernel), but the
> call to the library function itself does not cause a switch to kernel mode.
>
> Also, AFAIK usages of too many system calls normally may result into
> high number of CONTEXT SWITCHES so thought to ask before using any calls.

Almost all libraries depend to some extent on operating system calls to
manage resources, in particular to manage memory. It is not realistic to
program based on whether a library calls the operating system for some
reason. If you end up programming that way you end up contorting design
to something that is harder to write, understand, or change. I do not
think such contortions are worth it in any way.

>
>
> On Wed, Nov 6, 2013 at 7:23 PM, Igor R <boost.lists_at_[hidden]
> <mailto:boost.lists_at_[hidden]>> wrote:
>
> > Out of curiosity, wish to know if BOOST ASIO calls like -
> >
> > boost::asio::read()
> > boost::asio::transfer_all()
> > boost::asio::write()
> >
> > BOOST LEXICAL calls like -
> > boost::lexical_cast<std::string>()
> >
> > BOOST POSIX TIME calls like -
> > boost::posix_time::microsec_clock::universal_time()
> > boost::posix_time::microsec_clock::ptime()
> >
> > are LIBRARY or SYSTEM calls.
> >
> > How to know which calls of BOOST are SYSTEM and LIBRARY calls?
>
>
> Not sure what you mean by "system" and "library" (note that a Boost
> function can rely on some CRT facility, which in turn might call OS
> API), but you always can step into a desired function and see how it's
> implemented.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net