freebsd-dev/lib/libc/i386
Peter Wemm 6046bc37e8 Make getcontext(2) work on i386. It needs a small wrapper in libc
otherwise the return from the syscall stub for getcontext will pop off
the return value for the caller to the getcontext stub and it will appear
as though the setcontext() syscall returned instead of the getcontext().
The same bug exists on amd64, a fix is coming there too.

The bug can be demonstrated with this test code fragment:
main()
{
        ucontext_t top;

        if (getcontext(&top) == 0) {
                write(2, "PING!\n", 6);
                /* Cause a return value of 1 from getcontext this time */
                top.uc_mcontext.mc_eax = 1;
                setcontext(&top);
                err(1, "setcontext() returned");
        }
        write(2, "PONG!\n", 6);
        _exit(0);
}
2003-09-04 00:20:40 +00:00
..
gen Push the alloca #error warning farther down to play nicer with some out of 2003-06-25 19:06:40 +00:00
net Restore CSRG ID's lost in January 1995. 2002-03-23 02:10:28 +00:00
stdlib Replace our ancient dtoa/strtod implementation with the gdtoa 2003-03-12 20:30:00 +00:00
string MFp4: Pentium/Athlon-optimised implementation of wcschr(). 2003-04-05 04:17:05 +00:00
sys Make getcontext(2) work on i386. It needs a small wrapper in libc 2003-09-04 00:20:40 +00:00
_fpmath.h Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa(). 2003-04-05 22:10:13 +00:00
arith.h Add a comment describing why it's important for the values in this 2003-05-08 13:50:44 +00:00
SYS.h Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00