Re: Accessor macros vs reference counting

From: David Newall
Date: Sat Feb 23 2008 - 07:45:56 EST


Matthew Wilcox wrote:
> On Sat, Feb 23, 2008 at 04:14:08PM +0800, WANG Cong wrote:
>
>> Use get_personality() macro instead of explicit reference
>> for parisc code.
>> - if (personality(current->personality) == PER_LINUX32
>> + if (personality(get_personality()) == PER_LINUX32
>>
>
> Hm. We have an interesting clash of conventions here.
>
> On the one hand, we have the java-style accessor convention.
> get_personality()/set_personality().
>

Is get_personality() thought to be better than current->personality? To
me, the latter seems more meaningful, and I'd rather see it than the former.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/