syscall: td_retval and zero return value

Andriy Gapon avg at icyb.net.ua
Wed Nov 10 08:28:33 PST 2004


on 10.11.2004 16:00 gerarra at tin.it said the following:

> The way the handler advice you about syscalls failing is setting (and not
> clearing as you were saying) the carry bit in eflags register (about ia32).
> A sort of errno (if you see in a C-coder view) value is set in eax (or,
> alternatively, edx) to show the reason of failing. There's no way to know
> where error code is set; you can just verify pratically.

I was actually interested in the opposite situation - something is put
into eax,edx, but carry bit is cleared.

> You can find all these things on "Programmers handbook".

Thank you for the great hint! "The FreeBSD Developer's Handbook" has all.

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list