Giter Site home page Giter Site logo

libfib's Introduction

libfib is a library for fast and small fibers (cooperatively scheduled
userspace threads), which can load-balance an arbitrary number of
fibers onto an arbitrary number of hardware threads with
context-switch times on the order of a nanosecond (beat that,
Erlang!).

There's a few different synchronisation objects like mutexes,
condition variables, blocking channels, and an implementation of the
Actor model which has been tested up to tens of millions of actors.

To use any of this stuff, you'll need my modified version of the LLVM
compiler (see github.com/stedolan/llvm), and my patched version of the
Clang C/C++ compiler (github.com/stedolan/clang).

This is a big ugly code-dump at the moment. I'll clean up the repo
sometime... promise! (kinda).


Setting up a build environment:

git clone http://github.com/stedolan/llvm
{ cd llvm/tools; git clone http://github.com/stedolan/clang; }
{ cd llvm; ./configure && make; }

After you clone this repo, you'll need to modify LLVM_BINDIR at the
top of the Makefile and run "make plat=x86_64". If you're running on
PowerPC you'll need to have an SSH-able PPC host set up, and fiddle
with Makefile a bit (good luck, it's a mess).

fiber2.cpp is a good place to start hacking, it has examples of most
of the library's features. yield.cpp is simpler, it might be a better
testcase to determine whether clang's working.

libfib's People

Contributors

stedolan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.