Michael Bacarella <[EMAIL PROTECTED]> writes:
> gcc does not generate code that can make FreeBSD system calls directly.
> Most system calls as we know them by the manual have corresponding
> wrappers in libc. See /usr/src/lib/libc if you have the source installed.

Wrong. The threaded C library (libc_r) has wrappers for many syscalls
so it won't block all threads when one is waiting for a syscall to
complete, but apart from that, very few syscalls are wrapped.

Adam, it's really quite simple: if the carry flag is set, the syscall
failed, and the value returned is the errno (in your example, open(2)
returned 2, which is ENOENT, i.e. the file didn't exist). If it
succeeded, the value returned is the result (a file descriptor in
open(2)'s case).

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to