Subject: Re: CVS commit: src/sys
To: Perry E.Metzger <perry@piermont.com>
From: Matt Thomas <matt@3am-software.com>
List: source-changes
Date: 04/15/2006 07:55:24
On Apr 15, 2006, at 7:45 AM, Perry E. Metzger wrote:
>
> christos@astron.com (Christos Zoulas) writes:
>> In article <20060415063916.9009B23402@thoreau.thistledown.com.au>,
>> Simon Burge <simonb@wasabisystems.com> wrote:
>>> Brett Lymn wrote:
>>>
>>>> Module Name: src
>>>> Committed By: blymn
>>>> Date: Fri Apr 14 13:09:07 UTC 2006
>>>>
>>>> ...
>>>> src/sys/sys: iostat.h
>>>
>>> The new "struct io_stats" has members like:
>>>
>>> char *name; /* device name */
>>> void *parent; /* pointer to what we are
>>> attached to */
>>> int type; /* type of device the state belong
>>> to */
>>> int busy; /* busy counter */
>>>
>>> Should these names have io_ prefixes? The current names are a bit
>>> "generic", and could cause issues in code that includes <sys/
>>> iostat.h>.
>>>
>> They should. Let's do it.
>
> Er, we live in an age of modern compilers -- the namespace inside
> structs is struct specific. Why do struct members need prefixes like
> io_?
To avoid macro collisions. It also helps you recognize what the
structure being referenced.