On Sat, 15 Jan 2000, Guest section DW wrote:
> On Sat, Jan 15, 2000 at 10:14:06AM -0800, Robert Dinse wrote:
>
> > One question regarding this; something that's confused me with Linux...
> >
> > With SunOS all of the system calls are in section 2 of the man pages,
> > all of the library functions in section 3. With Linux there seems to be no
> > clear distinction?
>
> POSIX does not distinguish system calls and library functions.
> For the Unix API the way a call is implemented is unimportant.
> Often a former system call becomes a library function later,
> a special case of a more general system call.
>
> However, we might distinguish library functions that have the same
> name as system calls, and that usually are just a tiny wrapper
> around the system call itself, and "real" library functions.
>
> Under Linux, the "real" library functions are documented in man3.
> Usually the system calls, together with the libc wrapper, are
> documented in man2, especially when they have essentially the
> same calling convention (with return -EERROR replaced by return -1
> and errno = EERROR).
> When there are larger differences the libc wrapper is documented in
> man3 and the system call itself in man2. See for example readdir(2).
>
> Andries
The usefulness in distinquishing the two is that you know whether to look
at the libs or the kernel if a problem exists. While POSIX may not require
making a distinction, does it forbid it?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:12 EST