Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
Perry E. Metzger wrote:
> christos%astron.com@localhost (Christos Zoulas) writes:
>
>> In article <20060415063916.9009B23402%thoreau.thistledown.com.au@localhost>,
>> Simon Burge <simonb%wasabisystems.com@localhost> 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_?
>
> Perry
>
Conflict can occur with macros, which don't observe the other namespace
rules. It may be a good idea still to avoid generic names, particularly
in code that is going to be #include'd into userland programs.
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191
Home |
Main Index |
Thread Index |
Old Index