[Simh] VMS on SIMH/VAX on FreeBSD 9.0 (Lennert Van Alboom)

Bob Supnik bob at supnik.org
Thu May 24 12:33:11 EDT 2012


In sim_timer.c, locate this routine (there are several versions, look 
for the last one, which is for UNIX systems):

uint32 sim_os_ms_sleep_init (void)
{
uint32 i, t1, t2, tot, tim;

for (i = 0, tot = 0; i < sleep1Samples; i++) {
     t1 = sim_os_msec ();
     sim_os_ms_sleep (1);
     t2 = sim_os_msec ();
     tot += (t2 - t1);
     }
tim = (tot + (sleep1Samples - 1)) / sleep1Samples;
if (tim > SIM_IDLE_MAX)
     tim = 0;
return tim;
}

If you are running with gdb, place a breakpoint on the line

if (tim > SIM_IDLE_MAX)

and see what the value of 'tim' is. Otherwise, insert the following 
before the if statement:

printf ("Calculated minimum sleep time = %d\r\n", tim);

and see what gets printed out.

/Bob Supnik




More information about the Simh mailing list