Re: protothreads

看板DFBSD_kernel作者時間21年前 (2005/02/27 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
No, I don't think so. They sound just like continuations. The basic mechanism isn't very complex, we actually use similar sequencing all over our network protocol stacks. It's a very basic programming abstraction that doesn't really need a library or API abstraction to use. Besides, we have an API abstraction that does the job already... our LWKT messaging subsystem. -Matt Matthew Dillon <dillon@backplane.com> :http://www.sics.se/~adam/pt/ : :Protothreads are extremely lightweight stackless threads designed for :severely memory constrained systems such as small embedded systems or sensor :network nodes. Protothreads provide linear code execution for event-driven :systems implemented in C. Protothreads can be used with or without an :underlying operating system. : :Protothreads provide a blocking context on top of an event-driven system, :without the overhead of per-thread stacks. The purpose of protothreads is to :implement sequential flow of control without complex state machines or full :multi-threading. Protothreads provide conditional blocking inside C :functions. : :# No machine specific code - the protothreads library is pure C :# Does not use error-prone functions such as longjmp() :# Very small RAM overhead - only two bytes per protothread :# Can be used with or without an OS :# Provides blocking wait without full multi-threading or stack-switching :# Freely available under a BSD-like open source license : :Might be interesting for us? : :-- :Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
文章代碼(AID): #128Dp500 (DFBSD_kernel)
文章代碼(AID): #128Dp500 (DFBSD_kernel)