Dave, Thank you I believe I have the necessary information now to generate a workable simulation of your Thread.SML in F#. David
Date: Tue, 07 Jun 2011 17:55:11 +0100 From: David Matthews David.Matthews@prolingua.co.uk To: polyml@inf.ed.ac.uk Subject: Re: [polyml] Semantics of Threading Intrrupt Flags and proper interpretation in .Net simulation Message-ID: 4DEE57EF.30709@prolingua.co.uk In-Reply-To: 717F714B587F944C88837A99AA4D0081404C275E@TK5EX14MBXC116.redmond.corp.microsoft.com References: 717F714B587F944C88837A99AA4D0081404C275E@TK5EX14MBXC116.redmond.corp.microsoft.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: list Message: 3
Hi David,
On 06/06/2011 23:48, Dave Thayer wrote:
My questions are
What is the semantics of these flags as related to the behavior of threads and the Interrupt signal?
Have you looked at http://www.polyml.org/docs/Threads.html ? There's an explanation there. If it's not clear please let me know. This is really one of the most problematic bits of the threading model in Poly/ML.
- Can a single word be used to model these flags thusly (see below)
given that I am using a completely different runtime than what you are calling into?
1 -> InterruptDefer 2 -> InterruptSynch 4 -> InterruptAsynch 6 -> InterruptAsynchOnce 8 -> BroadcastInterrupt
Poly/ML currently uses a single word for these. The mapping is 1 -> Broadcast OR-ed with: 2 -> Synch 4 -> Asynch 6 -> AsynchOnce
It's actually in the second word of a 4-word thread object. The first word is a tagged integer which is an index into the thread table in the run-time system, the third points to a list of thread-local data and the fourth is a "hint" used in interrupt handling.
Regards, David ------------------------------
_______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
End of polyml Digest, Vol 69, Issue 2 *************************************