Re: Multiplexed registers and invalidating the register cache

Orjan Friberg
2004-04-22T13:58:09Z

Andrew Cagney wrote:
>
> Simpler, "target_changed" - no parameters.

Hm. observer.texi says "all events must take at least one parameter",
but having an event without a parameter worked fine. I assumed
observer.sh would yell at me, but it didn't ;) .

But wouldn't it make sense to have the register number parameter, and
based on that determine (in target-specific code) whether to flush the
frame cache and registers? Or was that part of the cost discussion
between you and Daniel, and what you're saying is that "whenever *any*
register is changed in *any* target, flush the frame and register cache"?

> The core code, after doing the write, should trigger this event ...
>
>> In addition, someone needs to notify that the event has happened, but
>> I assume these notifications should be inserted at the same places
>> that register_changed_hook is called for GUI purposes.
>
>
> ... [yes] replacing registers changed.

... meaning all calls to registers_changed should be changed into calls
to observer_notify_target_changed?

Also, if the observer should a generic

void
observer_target_changed (void)
{
registers_changed ();
flush_cached_frames ();
}

instead of target-specific one (I couldn't infer that from your answer),
where should it go?

--
Orjan Friberg
Axis Communications