bsnes/libco
MerryMage 30e274953a Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b'
git-subtree-dir: libco
git-subtree-mainline: c5b39e2dfc
git-subtree-split: 7871e50f7d
2020-04-19 17:41:20 +01:00
..
doc Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
README.md Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
aarch64.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
amd64.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
arm.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
fiber.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
libco.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
libco.h Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
ppc.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
ppc64v2.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
settings.h Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
sjlj.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
ucontext.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00
x86.c Add 'libco/' from commit '7871e50f7d48444f1a6333128308acb0a1c8ad2b' 2020-04-19 17:41:20 +01:00

README.md

libco

libco is a cooperative multithreading library written in C89.

Although cooperative multithreading is limited to a single CPU core, it scales substantially better than preemptive multithreading.

For applications that need 100,000 or more context switches per second, the kernel overhead involved in preemptive multithreading can end up becoming the bottleneck in the application. libco can easily scale to 10,000,000 or more context switches per second.

Ideal use cases include servers (HTTP, RDBMS) and emulators (CPU cores, etc.)

It currently includes backends for:

  • x86 CPUs
  • amd64 CPUs
  • PowerPC CPUs
  • PowerPC64 ELFv1 CPUs
  • PowerPC64 ELFv2 CPUs
  • ARM 32-bit CPUs
  • ARM 64-bit (AArch64) CPUs
  • POSIX platforms (setjmp)
  • Windows platforms (fibers)

License

libco is released under the ISC license.