Commit message (Collapse)AuthorAgeFilesLines
* libtf: major redesign startedHEADmasterTimo Teräs2010-07-0221-638/+719
| | | | | | | | | | the idea is to make libtf completely multi-threaded. meaning each fiber can be running concurrently in separate thread. quite a bit of framework is added for this and some atomic helpers are already introduced. however, io polling is busy polling now (will be soon in own thread) and timeouts are still more or less broken. oh, and the multithreading core is not there yet. basically we are currently mostly broken ;)
* mem: add mmap allocatorTimo Teras2010-03-107-9/+80
| | | | use it for heaps and fiber stacks.
* io: virtualize polling apiTimo Teras2010-03-106-79/+126
| | | | so we can in future have more polling frameworks than epoll.
* libtf: fix stack frame creation and valgrind issuesTimo Teras2010-03-107-49/+46
| | | | | debugging looks now better. there was also some valgrind issues that needed attention.
* libtf: separate scheduler fibre, change the core apiTimo Teras2010-03-1017-311/+533
* build: add os/arch detectionTimo Teras2010-03-091-0/+17
* build: rename {pro,epi}logue to enter/leaveTimo Teras2010-03-094-115/+6
| | | | it's less confusing this way.
* libtf: optimize x86 fiber switchingTimo Teras2009-12-012-16/+25
| | | | | by letting gcc figure out better how to represent stack pointers. also uses labels to make the code more readable.
* libtf: implement x86 assembly fiber switchingTimo Teras2009-11-272-8/+148
| | | | | | | it's faster and has smaller context in the beginning of the fiber. it's also required since setjmp() seems to use mangled pointers in glibc so we could not schedule fibers in non-creation threads. additionally the setjmp() setup code has a race condition.
* libtf: stackable timeoutsTimo Teras2009-11-267-71/+132
| | | | | | | instead of having per-function argument, use a push/pop mechanism: - multiple timers inside fiber use only one heap entry - easy to chain multiple possibly blocking operations inside one timeout block
* libtf: minor changes and new test case for network i/oTimo Teras2009-11-256-13/+139
| | | | fixup the internals a bit.
* libtf: implement basic networking i/oTimo Teras2009-11-257-98/+342
| | | | | pretty much untested. also some slight changes to how scheduler is invoked.
* libtf: implement basic file i/o with epollTimo Teras2009-11-2511-44/+453
| | | | | | some scetching of i/o api, and implement basic read and write functionality. integrate polling to scheduler and an epoll based polling mechanism.
* build: make make ignore missing dependencies from previous buildsTimo Teras2009-11-241-3/+6
| | | | | | maybe the path or #include file names changed. the dependencies will be autogenerated with new info since the previous pre-requisites are missing.
* libtf: implement timeoutsTimo Teras2009-11-248-34/+400
| | | | | internally put sleepers to d-ary heap based priority queue. the heap value is compared with overflow.
* libtf: initial commitTimo Teras2009-11-2416-0/+937
libtf is to be user-space cooperative threading library similar to State Threads (, but with additional support for multiple cores, using better algorithms and taking advantage of new Linux kernel syscalls such as eventfd, signalfd and epoll (edge-triggered mode). Initial implementation has setjmp based user-space context switching and trivial testcase. Works on Linux/x86. TFbuild uses ideas from different build systems, namely Kbuild, but it's inner workings are quite different. All build files are included (using macro trickery) instead of recursive making. Thus the build dependency graph is complete and should yield good make performance. Also parallel stuff should work.