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

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

 



On Sun, Apr 01, 2007 at 12:56:26PM -0400, Robert P. J. Day wrote:
> 
>   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)
> ...
> 

An actual one would be something like (sys_exit in example):
   movl	  $1, %eax     # exit() syscall number
   movl	  $0, %ebx     # the parameter
   int	  0x80	       # interrupt vector for syscalls.

> 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.
> 

read(), write() from userspace are just libc wrappers for appropriate kernel
system calls. Remember the last discussion on LKML about adding a new 
syscall fallocate() ?. They gonna break the parameters in the kernel interface
but this will be invisible in the userspace land by using libc wrappers.

Regards,

-- 
Ahmed S. Darwish
http://darwish.07.googlepages.com


--
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