[lkml]   [2000]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: flags_t
On Wed, Aug 23, 2000 at 10:05:04PM +0200, Jes Sorensen wrote:
> >>>>> "Cesar" == Cesar Eduardo Barros <> writes:
> Cesar> I have always been annoyed by the fact that save/restore_flags
> Cesar> save/restore the flags using an unsigned long variable. I think
> Cesar> it would be clearer to use
> Cesar> typedef struct { unsigned long _flags; } flags_t;
> Cesar> or something like that.
> 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.

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

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

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

Cesar Eduardo Barros
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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