mirror of
https://github.com/open-simh/simh.git
synced 2026-01-25 19:57:36 +00:00
TIMER: Add correct sim_activate_time functionality for all timer cases.
Also: - allow a timer to dynamically stop itself (by calling sim_rtcn_calb with tps=0), and then to start the internal timer to provide a calibration baseline if necessary. - Fix coschedule interval computation when the queue is empty. - Properly select the correct timer for coscheduling without a specific tmr - Properly adjust the coschedule queue's next time value when entries are canceled. - Cleaned up throttling to behave well with all potential throttling rates and to make visible what is happening when boundaries are reached.
This commit is contained in:
11
sim_defs.h
11
sim_defs.h
@@ -1001,16 +1001,6 @@ extern int32 sim_asynch_inst_latency;
|
||||
if ((uptr)->cancel) \
|
||||
(uptr)->cancel (uptr)
|
||||
#endif /* !defined(AIO_CANCEL) */
|
||||
#if defined(SIM_ASYNCH_CLOCKS)
|
||||
#define AIO_RETURN_TIME(uptr) \
|
||||
do { \
|
||||
int32 rtime = sim_timer_activate_time (uptr); \
|
||||
if (rtime >= 0) \
|
||||
return rtime; \
|
||||
} while (0)
|
||||
#else
|
||||
#define AIO_RETURN_TIME(uptr) (void)0
|
||||
#endif
|
||||
#define AIO_EVENT_BEGIN(uptr) \
|
||||
do { \
|
||||
int __was_poll = uptr->dynflags & UNIT_TM_POLL
|
||||
@@ -1186,7 +1176,6 @@ extern int32 sim_asynch_inst_latency;
|
||||
#define AIO_LOCK
|
||||
#define AIO_UNLOCK
|
||||
#define AIO_CLEANUP
|
||||
#define AIO_RETURN_TIME(uptr)
|
||||
#define AIO_EVENT_BEGIN(uptr)
|
||||
#define AIO_EVENT_COMPLETE(uptr, reason)
|
||||
#define AIO_IS_ACTIVE(uptr) FALSE
|
||||
|
||||
Reference in New Issue
Block a user