[m-rev.] for review: bug fixes for threads
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Mar 2 13:52:48 AEDT 2007
On Fri, 2 Mar 2007, Peter Wang wrote:
>>> Index: runtime/mercury_engine.c
>>> ===================================================================
>>> RCS file: /home/mercury1/repository/mercury/runtime/mercury_engine.c,v
>>> retrieving revision 1.55
>>> diff -u -r1.55 mercury_engine.c
>>> --- runtime/mercury_engine.c 11 Dec 2006 03:03:13 -0000 1.55
>>> +++ runtime/mercury_engine.c 16 Feb 2007 04:07:40 -0000
>>> @@ -37,6 +37,7 @@
>>>
>>> #ifndef MR_USE_GCC_NONLOCAL_GOTOS
>>> static MR_Code *engine_done(void);
>>> + static MR_Code *engine_done_2(void);
>>> static MR_Code *engine_init_registers(void);
>>> #endif
>>
>> I don't understand the distinction between engine_done and
>> engine_done_2.
>>
>
> engine_done can now be entered while the context is running on the wrong
> engine (thread). If it turns out to be the case, then we suspend the
> context and reschedule it so that it will resume in engine_done_2 and be
> run on the correct engine. So engine_done_2 will always be run on the
> engine which started the C->Mercury call, and engine_done ensures that
> is the case.
Please add a comment in that section of code to this effect.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list