librfn/fibre: An extremely compact run-to-completion scheduler
authorDaniel Thompson <daniel@redfelineninja.org.uk>
Sat, 12 Jan 2013 16:58:17 +0000 (16:58 +0000)
committerDaniel Thompson <daniel@redfelineninja.org.uk>
Sat, 12 Jan 2013 16:58:17 +0000 (16:58 +0000)
commit3e93370bf9dc07abd4102195d02be0cde2868444
treea4af6abb75004ce5a92de62ffc46786697cbeae2
parent50d06ffeb051146178f56a4a7c43eac747f38583
librfn/fibre: An extremely compact run-to-completion scheduler

librfn's fibre scheduler supports traditional run-to-completion fibres
based on state machines. However it is also tightly integrated with
librfn's protothread macros allowing thread-like code to be written
(protothreads are basically a clever trick to implement simple state
machines from C control flow statements).

Unusually the timer module is *external* to the scheduler. This makes
(sequential) testing very easy because the test suite can arbitrarily
alter the flow of time to suit the test.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
.gitignore
Makefile-librfn.am
src/librfn/fibre.c [new file with mode: 0644]
src/librfn/include/librfn.h
src/librfn/include/librfn/fibre.h [new file with mode: 0644]
src/librfn/include/librfn/util.h
src/librfn/tests/fibretest.c [new file with mode: 0644]
src/librfn/util.c