[m-rev.] for post-commit review: print trail state in mdb

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 10 14:01:41 AEST 2008


On Tue, 10 Jun 2008, Zoltan Somogyi wrote:

> On 10-Jun-2008, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> +MR_Unsigned
>> +MR_num_trail_entries(void)
>> +{
>> +#if defined(MR_THREAD_SAFE)
>> +    return MR_trail_ptr -
>> +        (MR_trailEntry *) MR_CONTEXT(MR_ctxt_trailzone)->MR_zone_min;
> +#else
>> +    return MR_trail_ptr - (MR_TrailEntry *) MR_trail_zone->MR_zone_min;
>> +#endif /* ! MR_THREAD_SAFE */
>> +}
>> +
>
> Shouldn't there be a macro that expands to either
>
> 	MR_CONTEXT(MR_ctxt_trailzone)
>
> or
>
> 	MR_trail_zone
>
> depending on MR_THREAD_SAFE?

Not that I'm aware of - there's never really been a need for it.

There are such macros for the more commonly used pieces of trail states,
e.g. MR_trail_ptr, MR_ticket_counter etc.

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