--- Gnu-Mach/kern/mach_clock.c 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/kern/mach_clock.c 2020/09/02 04:42:48 1.1.1.3 @@ -141,7 +141,7 @@ void clock_interrupt(usec, usermode, bas else { timer_bump(&thread->system_timer, usec); } -#endif STAT_TIME +#endif /* STAT_TIME */ /* * Increment the CPU time statistics. @@ -167,7 +167,7 @@ void clock_interrupt(usec, usermode, bas thread_quantum_update(my_cpu, thread, 1, state); } -#if MACH_SAMPLE +#if MACH_PCSAMPLE /* * Take a sample of pc for the user if required. * This had better be MP safe. It might be interesting @@ -193,7 +193,7 @@ void clock_interrupt(usec, usermode, bas * Increment the tick count for the timestamping routine. */ ts_tick_count++; -#endif TS_FORMAT == 1 +#endif /* TS_FORMAT == 1 */ /* * Update the tick count since bootup, and handle @@ -369,6 +369,19 @@ void init_timeout() } /* + * Record a timestamp in STAMP. + */ +void +record_time_stamp (time_value_t *stamp) +{ + do { + stamp->seconds = mtime->seconds; + stamp->microseconds = mtime->microseconds; + } while (stamp->seconds != mtime->check_seconds); +} + + +/* * Read the time. */ kern_return_t @@ -407,7 +420,7 @@ host_set_time(host, new_time) thread_bind(current_thread(), master_processor); if (current_processor() != master_processor) thread_block((void (*)) 0); -#endif NCPUS > 1 +#endif /* NCPUS > 1 */ s = splhigh(); time = new_time; @@ -420,7 +433,7 @@ host_set_time(host, new_time) * Switch off the master CPU. */ thread_bind(current_thread(), PROCESSOR_NULL); -#endif NCPUS > 1 +#endif /* NCPUS > 1 */ return (KERN_SUCCESS); } @@ -448,7 +461,7 @@ host_adjust_time(host, new_adjustment, o thread_bind(current_thread(), master_processor); if (current_processor() != master_processor) thread_block((void (*)) 0); -#endif NCPUS > 1 +#endif /* NCPUS > 1 */ s = splclock(); @@ -469,7 +482,7 @@ host_adjust_time(host, new_adjustment, o splx(s); #if NCPUS > 1 thread_bind(current_thread(), PROCESSOR_NULL); -#endif NCPUS > 1 +#endif /* NCPUS > 1 */ *old_adjustment = oadj;