hurd: Add getcontext, makecontext, setcontext, swapcontext
authorThomas Schwinge <thomas@codesourcery.com>
Sun, 29 Dec 2019 15:04:51 +0000 (16:04 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 29 Dec 2019 15:54:08 +0000 (16:54 +0100)
commita678c13b8f9fa67c6cffe6ecf4ba1d5e53479e1b
treecb62c6fb5a84d4cdcb6d46f78318fb1818481af3
parent344e755248ce02c0f8d095d11cc49e340703d926
hurd: Add getcontext, makecontext, setcontext, swapcontext

Adapted from the Linux x86 functions.

Not thoroughly tested, but manual testing as well as glibc tests look fine, and
manual -lpthread testing also looks fine (within the given bounds for a new
stack to be used with makecontext).

This has also been in use in Debian since 2013.
sysdeps/mach/hurd/i386/Makefile
sysdeps/mach/hurd/i386/getcontext.S [new file with mode: 0644]
sysdeps/mach/hurd/i386/makecontext.S [new file with mode: 0644]
sysdeps/mach/hurd/i386/setcontext.S [new file with mode: 0644]
sysdeps/mach/hurd/i386/swapcontext.S [new file with mode: 0644]
sysdeps/mach/hurd/i386/ucontext_i.sym [new file with mode: 0644]