ucontext implementation featuring glibc-compatible ABI
 
 
 
 
Go to file
Ariadne Conill 74121dfe75 build: install generated headers 2020-12-06 04:01:26 -06:00
arch m68k: add freestanding bits.h file 2020-12-06 03:53:45 -06:00
include/libucontext include: add public libucontext/libucontext.h header 2020-12-06 03:53:58 -06:00
.gitignore gitignore: add include/libucontext/bits.h 2020-12-06 03:54:22 -06:00
.mailmap update copyright statements, add mailmap 2020-03-27 09:23:49 +00:00
LICENSE update copyright statements, add mailmap 2020-03-27 09:23:49 +00:00
Makefile build: install generated headers 2020-12-06 04:01:26 -06:00
NEWS begin NEWS for 0.13 2020-12-06 02:42:37 -06:00
README.md README: note m68k support 2020-12-06 02:25:53 -06:00
test_libucontext.c test program: use libucontext-prefixed symbols 2020-12-06 03:32:09 -06:00

README.md

libucontext

libucontext is a library which provides the ucontext.h C API. Unlike other implementations, it faithfully follows the kernel process ABI when doing context swaps.

Notably, when combined with gcompat, it provides a fully compatible implementation of the ucontext functions that are ABI compatible with glibc.

supported architectures

Adding support for new architectures is easy, but you need to know assembly language to do it.

Right now these archs are supported and should work on bare metal:

  • x86
  • x86_64
  • armv6+ (arm)
  • aarch64
  • s390x
  • mips (O32 ABI only)
  • mips64 (N32/N64 ABI only, like Alpine, only N64 ABI has been tested)
  • riscv64
  • m68k

These archs require kernel assistance and use a syscall:

  • ppc
  • ppc64 (ELFv2 ABI spec only, ELFv1 not supported)

building

libucontext uses a simple makefile build system. You should define ARCH= at build time, otherwise the build system will attempt to guess using uname -m.

$ make ARCH=x86_64
$ make ARCH=x86_64 check
$ make ARCH=x86_64 DESTDIR=out install