From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bakul Shah Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Message-Id: <79C9DFA9-1814-477D-B2C2-CADE5B2D44B2@bitblocks.com> Date: Thu, 9 Jul 2015 08:51:31 -0700 References: In-Reply-To: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] rsc's libtask on embedded Topicbox-Message-UUID: 5fca9cac-ead9-11e9-9d60-3106f5b1d025 Sounds like all you want are coroutines (with create, destroy & switch-to ca= lls) and wait queues (with create, destroy, signal & wait calls). With these= you can build channels easily. With a bit more work you can even implement p= re-emption but then you need mutexes. Setjmp/longjmp is fine (that was I did= in my first version ages ago!). > On Jul 9, 2015, at 7:50 AM, Steve Simon wrote: >=20 > The system I am trying to add libtask to has no runtime other than libc. >=20 > Corrently it is an even based system that uses a "min main loop" and > a twisty maze of nested state machines that all look the same. >=20 > Hence my desire to add co-routines + channels (i.e. exactly what libtask i= s) > to it. I have no need for the file or network modules but those are easily= removed. >=20 > I don't have the context calls but I do have setjmp/longjmp so that is wha= t I > am trying to use. >=20 > I will shout if it works out. >=20 > -Steve >=20