[lkml]   [2000]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Man - was: Re: Big Swap...
    On Sat, Jan 15, 2000 at 01:53:34PM -0800, Robert Dinse wrote:

    > > 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.
    > The usefulness in distinquishing the two is that you know whether to look
    > at the libs or the kernel if a problem exists.

    No. There is no such distinction.

    I guess that your question is inspired by this getpagesize() business,
    so take that as example.

    First of all, you can test using strace whether something leads to a syscall
    or not. In the case of getpagesize() that depends on the architecture, and
    on the libc version, and on whether the program was compiled statically.
    (Usually [g]libc thinks it knows the answer itself, and hence does not
    use a system call, except possibly in the case of a Sparc under
    glibc, where the system call getpagesize() may be used. If the program
    was a dynamic ELF program then pagesize is derived by the ELF loader.
    On some systems sysconf(_SC_PAGESIZE) is used.)

    You see - system call? Or not? Depends on a dozen other things.
    There is no clear-cut distinction.
    It so happens that the man page is in man2. There is no better place.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:55    [W:0.020 / U:9.008 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site