* Paul E. McKenney ([email protected]) wrote: > On Wed, Jun 08, 2011 at 06:46:20PM -0400, Mathieu Desnoyers wrote: > > * Paul E. McKenney ([email protected]) wrote: > > > On Wed, Jun 08, 2011 at 06:15:30PM -0400, Mathieu Desnoyers wrote: > > > > * Paolo Bonzini ([email protected]) wrote: > > > > > The qlen variable is write-only, we can remove it easily. > > > > > > > > I defer to Paul for this one: he likes keeping qlen there so the > > > > debugger can show the list state, which is useful for debugging. I'll > > > > let you two figure out how to come to an agreement. ;) > > > > > > Indeed, I have often used gdb to read ->qlen. ;-) > > > > So maybe adding a comment besides qlen stating the reason why it's there > > (e.g. for debugging purposes) might be appropriate ? > > Good point! How about the following?
Merged, thanks! Mathieu > > Thanx, Paul > > ------------------------------------------------------------------------ > > Add comment to flag purpose of the ->qlen field > > It is write-only, but is needed for debugging purposes. > > Signed-off-by: Paul E. McKenney <[email protected]> > > diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h > index cfe1cce..9beb58c 100644 > --- a/urcu-call-rcu-impl.h > +++ b/urcu-call-rcu-impl.h > @@ -48,7 +48,7 @@ struct call_rcu_data { > unsigned long flags; > pthread_mutex_t mtx; > int futex; > - unsigned long qlen; > + unsigned long qlen; /* maintained for debugging. */ > pthread_t tid; > int cpu_affinity; > struct cds_list_head list; > -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
