mirror of
https://github.com/open-simh/simh.git
synced 2026-04-25 20:01:33 +00:00
- Changed asynch queue insertion and removal to use a lock free algorithm based only on InterlockedCompareExchangePointer. We can now use this lock free approach on IA64 host systems as well.
- Removed flawed logic which assumed that sim_interval was meaningful when referenced by an asynchronous thread. - Adjust the event_time of events removed from the asynch queue to account for the average time spent on the queue before the event was noticed by the instruction execution thread. - Added a sim_activate_notbefore function which specifies an rtime which is the earliest time the event should fire. - Changed the 'wakeup from idle' logic to force an immediate asynch queue check if the wakeup was not due to a timeout (i.e. it was due to an asynch queue insertion). - Fixed the descrip.mms to build asynchronous support on AXP and IA64 VMS with kernel threads enabled
This commit is contained in:
@@ -1794,15 +1794,13 @@ return 0; /* success! */
|
||||
void rq_io_complete (UNIT *uptr, t_stat status)
|
||||
{
|
||||
MSC *cp = rq_ctxmap[uptr->cnum];
|
||||
int32 elapsed = sim_grtime()-uptr->iostarttime;
|
||||
|
||||
sim_debug (DBG_TRC, rq_devmap[cp->cnum], "rq_io_complete(status=%d)\n", status);
|
||||
|
||||
uptr->io_status = status;
|
||||
uptr->io_complete = 1;
|
||||
/* Reschedule for the appropriate delay */
|
||||
if (elapsed <= rq_xtime)
|
||||
sim_activate_abs (uptr, rq_xtime-elapsed);
|
||||
sim_activate_notbefore (uptr, uptr->iostarttime+rq_xtime);
|
||||
}
|
||||
|
||||
/* Unit service for data transfer commands */
|
||||
|
||||
@@ -1280,15 +1280,13 @@ return ST_SUC; /* success! */
|
||||
void tq_io_complete (UNIT *uptr, t_stat status)
|
||||
{
|
||||
struct tq_req_results *res = (struct tq_req_results *)uptr->results;
|
||||
int32 elapsed = sim_grtime()-uptr->iostarttime;
|
||||
|
||||
sim_debug(DBG_TRC, &tq_dev, "tq_io_complete(status=%d)\n", status);
|
||||
|
||||
res->io_status = status;
|
||||
res->io_complete = 1;
|
||||
/* Reschedule for the appropriate delay */
|
||||
if (elapsed <= tq_xtime)
|
||||
sim_activate_abs (uptr, tq_xtime-elapsed);
|
||||
sim_activate_notbefore (uptr, uptr->iostarttime+tq_xtime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user