lkml.org 
[lkml]   [2000]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: flags_t
From
Date
>>>>> "Cesar" == Cesar Eduardo Barros <cesarb@nitnet.com.br> writes:

Cesar> On Wed, Aug 23, 2000 at 10:05:04PM +0200, Jes Sorensen wrote:
>> No it wouldn't, on some architectures it is safe to do
>> safe_flags() on a short type, like a short which can then be used
>> in the architecture specific code.

Cesar> Then the typedef could be architeture-specific. Or you could
Cesar> use two typedefs.

No it shouldn't, when using it in data structures you want it as is as
unsigned long for proper alignment of data.

>> typedef's for the sake of typedef's is not a good idea.

Cesar> It's not for the sake of it, it's for extra type safety.

Wrong, a lot of people keep thinking lets add yet another 500
typedef's but they don't buy you anything except complexity and
confusion. You can still play games directly on the original data
type.

Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.060 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site