Messages in this thread |  | | Date | Thu, 24 Aug 2000 19:28:04 +0200 (MET DST) | From | Roman Zippel <> | Subject | Re: flags_t |
| |
Hi,
> >> 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.
If that flag ends up in a structure, it's a bug.
> 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.
What is complex about a typedef? It can increase readability, it makes clear for what that variable has to used for and it clearly tells that its value has to considered private.
bye, Roman
- 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/
|  |