From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8dc25d6e6eb4100818b09a511477f06e@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] Sleep-complexity From: Charles Forsyth Date: Sun, 8 May 2005 22:12:35 +0100 In-Reply-To: <20050508172815.GA29137@augusta.math.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 46cff23c-ead0-11e9-9d60-3106f5b1d025 >> because long and int are the same so it really doesn't matter. >That's not a terribly great assumption to make, is it? the assumption usually made in practice is a little more subtle: int <= long[=32] < long long [=64]. most older programs tended to use int for things such as for loop values, that probably needed to be at least 16 bits, but might not need to be as much as 32. by contrast, a `long' quite often needed to be 32 bits, and often that was `no more, no less'. it's historically consistent and works well enough. u32int etc are used a bit more these days, but not exclusively. the other subtle assumptions concern pointers and integers. as it happens, the best choice there is happily consistent with dhog's, although he didn't face that problem in his alpha port. it does need source code changes, but with care, they tend to be fairly limited, outside the kernel.