Messages in this thread | | | Date | Sat, 15 Jan 2000 21:04:03 +0100 | From | Guest section DW <> | Subject | Man - was: Re: Big Swap... |
| |
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
[Now the collection of man pages is far from perfect. Contributions are very welcome. One might do political things, like convincing POSIX / IEEE / OpenGroup or so to let us use their text. Or one might document new system calls. Or one might compare with the latest glibc and document the functions that do not have a man page yet. Or one might compare carefully the SUSv2 or Austin texts with the current man pages and note differences. Or one might compare carefully the man pages for system calls with the present kernel code and note differences. Lots of work to do. And then there is the more editorial part: make the markup more uniform. Etc. Send contributions to aeb@cwi.nl .]
- 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/
| |