On Sun, 20 Nov 2022 06:55:23 -0600
Scott Cheloha <scottchel...@gmail.com> wrote:

> Build completed, upgrade from resulting bsd.rd completed.  I think
> this is ready to commit.

I'm happy to hear that your dual G4 macppc is running and your diff
works.  Your clock diff doesn't conflict with my incomplete suspend
diff, because we are editing different files.  (My PowerBook G4 can
suspend but not resume, so my diff isn't ready to commit.)

I want to mention one little detail,

> @@ -54,7 +58,14 @@ u_int tb_get_timecount(struct timecounte
>   */
>  u_int32_t ticks_per_sec = 3125000;
>  u_int32_t ns_per_tick = 320;
> -static int32_t ticks_per_intr;
> +uint64_t dec_nsec_cycle_ratio;
> +uint64_t dec_nsec_max;
> +static int initialized;
> +
> +const struct intrclock dec_intrclock = {
> +     .ic_rearm = dec_rearm,
> +     .ic_trigger = dec_trigger
> +};
>  
>  static struct timecounter tb_timecounter = {
>       .tc_get_timecount = tb_get_timecount,

The old "static int32_t ticks_per_intr;" was visible in ddb,

ddb> x/ld ticks_per_intr,1
ticks_per_intr: 184320

I don't like "static int initialized;" because its name is too
generic, so "x/ld initialized,1" might examine the wrong file's
"initialized".

I prefer a less generic name, perhaps
"int clock_initialized;"

If it isn't "static", the linker might check that it doesn't have
the same name as another variable.  I don't need you to try another
"make build" if you rename this variable.

--George

Reply via email to