Skip to content

chzesa/c-fiber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

C Fiber

An implementation of green threads in c, with c++ templates, for x86_64 processors.

Two synchronization primitives are provided

  • Semaphore: Allow a number of concurrent fibers
  • Barrier: All waiting fibers are released at once

czsf_wait() on a sync primitive must be called from a fiber.

Iinclude the following snippet in one source file:

#define CZSF_IMPLEMENTATION
#include "czsf.h"

Based on the presentation Parallelizing the Naughty Dog Engine Using Fibers.

Building the example

Linux:

g++ example.cpp -pthread

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages