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 <[email protected]> To: [email protected] Subject: Re: [polyml] Semantics of Threading Intrrupt Flags and proper interpretation in .Net simulation Message-ID: <[email protected]> In-Reply-To: <717f714b587f944c88837a99aa4d0081404c2...@tk5ex14mbxc116.redmond.corp.microsoft.com> References: <717f714b587f944c88837a99aa4d0081404c2...@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 > > 1. 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. > > 2. 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 [email protected] http://lists.inf.ed.ac.uk/mailman/listinfo/polyml End of polyml Digest, Vol 69, Issue 2 ************************************* -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ polyml mailing list [email protected] http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
