On Wed, Jul 06, 2011 at 10:58:09PM +0100, Peter Maydell wrote: > On 6 July 2011 21:04, Christopher Harvey <char...@matrox.com> wrote: > > Below are some random comments noticed on a first-pass. > > > +/* Global timer data */ > > +static uint64_t global_timer_count = 0; > > +static uint64_t global_timer_this_inc = 0; > > + ??/* Only for prescale and enable bits */ > > +static uint32_t global_timer_control = 0; > > Static globals look like the wrong thing to me. >
My C code design is pretty bad. I generally just try to copy the style around what I'm editing. These variables are to be used exclusively inside hw/mpcore.c and are referenced in many of the functions. How would you change this code? thanks, -Chris