Re: "system calls", and a question of terminology

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-04-01 at 12:56 -0400, Robert P. J. Day wrote:
>   a fairly basic question, but i just want to be clear on terminology.
> in robert love's book "linux kernel development" 2ed. (henceforth just
> LKD2), love is discussing the available file operations in ch 12, pp.
> 228-9.
> 
>   he describes what are pretty clearly userspace calls such as
> llseek(), read(), aio_read() and so on as "system calls".  that's not
> what i understand by the phrase "system calls."
> 
>   i've always used that description to refer to what love talks about
> in ch 5, "system calls."  from my perspective, an actual system call
> from userspace would look like what love has on p. 73:
> 
> #define __NR_foo 283
> __syscall0(long, foo)
> ...
> 
> and so on; that is, it *explicitly* uses the _syscalln() macros.
> IMHO, a simple call to something like read() and write() is simply a
> userspace call which *eventually* invokes the corresponding system
> call.
> 

The kernel provides system services, aka syscalls, and exports them via
ABI (application BINARY interface). 

On the other hand, the system libraries provides wrapper routines for
the different programming languages so that the syscalls they can be
used more easily, from any programming language.

These wrapper routines allow the ABI to change without affecting the
system application-level interface (API) - standards such as POSIX
defines the API, not the ABI.

This way, as long as the UNIX programmer is concerned,there is no such
thing as "__syscall0(long, foo)", and read() _is_ the syscall.

For the kernel developer, it is a different story.

>   can someone clarify this, as i *really* hate to use sloppy or
> inaccurate terminology.
> 

So, as far as I am concerned, the term "syscalls" can be used to refer
to the userspace calls if you are discussing from the application point
of view.

And it should be used carefully in certain contexts when discussing from
the kernel perspective, such when you are posting to this mailing
list :D


Cheers,
Fabiano

> rday
> 


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux