[jhc] [Haskell-cafe] [Rejected Paper] Experience Report: Writing NetBSD Sound Drivers in Haskell
Kiwamu Okabe
kiwamu at debian.or.jp
Tue Jun 10 11:42:46 UTC 2014
Hi John,
On Tue, Jun 10, 2014 at 8:28 PM, John Meacham <john at repetae.net> wrote:
> Ah. I think I see what you mean by reentrant in your paper. Can you
> point me to your context switching code in ajhc?
Here is.
https://github.com/ajhc/ajhc/blob/arafura/rts/rts/conc.c#L33
It's a sample with pthread.
But CLHs can choose any thread style with calling C code that generate
context switch.
> Is SMP a concern for you or are you mainly concerned about hardware interrupts?
Both thread on SMP and interrupt.
Former uses active context switch, and the example is the above.
Later uses passive context switch, however the interrupt context
begins on C context.
The C context create new "arena" when calling C => Haskell.
Thank's,
--
Kiwamu Okabe at METASEPI DESIGN
More information about the jhc
mailing list