diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-05-21 06:54:13 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-05-21 06:54:13 +0000 |
commit | 50a2a691824992f474b19bf40bbff016b2f67150 (patch) | |
tree | 00df34e93ad0cb95e742316790b57f1ced5d7bb8 /sim/common/sim-events.h | |
parent | 003c91bec4849e4a5b54d6e81383a4ff4376e996 (diff) | |
download | fsf-binutils-gdb-50a2a691824992f474b19bf40bbff016b2f67150.zip fsf-binutils-gdb-50a2a691824992f474b19bf40bbff016b2f67150.tar.gz fsf-binutils-gdb-50a2a691824992f474b19bf40bbff016b2f67150.tar.bz2 |
Watchpoint interface.
Diffstat (limited to 'sim/common/sim-events.h')
-rw-r--r-- | sim/common/sim-events.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h index 8c41927..fffde47 100644 --- a/sim/common/sim-events.h +++ b/sim/common/sim-events.h @@ -75,15 +75,19 @@ typedef struct _sim_event sim_event; typedef struct _sim_events sim_events; struct _sim_events { - int processing; + int nr_ticks_to_process; sim_event *queue; sim_event *watchpoints; sim_event *watchedpoints; + sim_event *free_list; /* flag additional work needed */ volatile int work_pending; /* the asynchronous event queue */ - sim_event *volatile held; - sim_event *volatile *volatile held_end; +#ifndef MAX_NR_SIGNAL_SIM_EVENTS +#define MAX_NR_SIGNAL_SIM_EVENTS 2 +#endif + sim_event *held; + volatile int nr_held; /* timekeeping */ SIM_ELAPSED_TIME initial_wallclock; signed64 time_of_event; @@ -131,21 +135,20 @@ EXTERN_SIM_EVENTS\ void *data); EXTERN_SIM_EVENTS\ -(sim_event *) sim_events_schedule_after_signal +(void) sim_events_schedule_after_signal (SIM_DESC sd, signed64 delta_time, sim_event_handler *handler, void *data); -/* Schedule an event WALLCLOCK milli-seconds from the start of the - simulation. The exact interpretation of wallclock is host - dependant. */ +/* Schedule an event milli-seconds from NOW. The exact interpretation + of wallclock is host dependant. */ EXTERN_SIM_EVENTS\ (sim_event *) sim_events_watch_clock (SIM_DESC sd, - unsigned wallclock_ms_time, + unsigned delta_ms_time, sim_event_handler *handler, void *data); @@ -186,7 +189,6 @@ EXTERN_SIM_EVENTS\ sim_event_handler *handler, void *data); - /* Deschedule the specified event */ EXTERN_SIM_EVENTS\ @@ -212,17 +214,33 @@ INLINE_SIM_EVENTS\ /* Progress time - separated into two parts so that the main loop can - save its context before the event queue is processed */ + save its context before the event queue is processed. + + sim_events_tickn advances the clock by N cycles. */ INLINE_SIM_EVENTS\ (int) sim_events_tick (SIM_DESC sd); INLINE_SIM_EVENTS\ +(int) sim_events_tickn +(SIM_DESC sd, + unsigned n); + +INLINE_SIM_EVENTS\ (void) sim_events_process (SIM_DESC sd); +/* Progress time such that an event shall occure upon the next call to + sim_events tick */ + +#if 0 +INLINE_SIM_EVENTS\ +(void) sim_events_timewarp +(SIM_DESC sd); +#endif + /* local concept of time */ |