[M3commit] CVS Update: cm3
hosking at cs.purdue.edu
Mon Dec 14 16:39:31 CET 2009
Main thread should call Yield if you want that behavior, not sleep.
On 14 Dec 2009, at 14:57, Jay Krell wrote:
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 09/12/14 14:57:30
> Added files:
> Log message:
> working version of http://www.engelschall.com/pw/usenix/2000/pmt-html/
> - This should be moved to m3core/src/thread/POSIX
> - Notice how I switched from virtual timer to real timer,
> in the test case that mimics m3core/src/thread/POSIX.
> "This seems to work much better."
> In particular, if the main thread does while (1) sleep(0)
> to let things run, nothing runs. The virtual time doesn't
> run down at all. If I make it a busy wait "while (1) ;" then
> it does work.
> Note that Apple seems very down on supplying get/make/set/swapcontext (read the mailing lists).
> This solution might be preferred? Though it is slower to create a thread here, due to
> extra gymnastics to establish the initial context.
> Also still some experiments to try.
> _setjmp vs. setjmp vs. sigsetjmp.
> Best is probably sigsetjmp(1).
> using the same signal in both parts
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3commit