[m-rev.] for review: fix handling of contexts in engines

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Apr 16 11:59:34 AEST 2007


On 16-Apr-2007, Peter Wang <wangp at students.csse.unimelb.edu.au> wrote:
> > +#define MR_copy_eng_this_context_fields(to_cptr, from_cptr)                   \
> > +    do {                                                                      \
> > +        to_cptr->MR_ctxt_resume = from_cptr->MR_ctxt_resume;                  \
> > +        to_cptr->MR_ctxt_thread_local_mutables =                              \
> > +            from_cptr->MR_ctxt_thread_local_mutables;                         \
> > +        /* it wouldn't be appropriate to copy the spark_stack field */        \
> > +        /* it wouldn't be appropriate to copy the saved_owners field */       \
> > +    } while (0)
> 
> Maybe add a comment that this is for own stack minimal model tabling.
> In general, copying the MR_ctxt_resume would not be useful.

> Also, I don't know anything about minimal model tabling, but would it be
> more appropriate to clone the thread local mutable array here
> (using MR_clone_thread_local_mutables)?

Generators are not allowed to do I/O, and users shouldn't see them as
separate threads (since with the old minimal model implementation, they
aren't).

I am following your other comments.

Zoltan.
--------------------------------------------------------------------------
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