Re: atomic_t and atomic_inc

From: Jamie Lokier
Date: Sat May 15 2004 - 17:55:31 EST


Richard B. Johnson wrote:
> Type atomic_t is an integer that can be accessed in memory
> with an uninterruptible instruction. This limits the atomic_t
> type in 32-bit machines to 32-bits, in 64-bit machines to 64-bits,
> etc. It has nothing to do with wrap-around. If you increment
> 0xffffffff it becomes 0 even it it's an atomic type.

Note that atomic_t used to be 24 bits on Sparc. It isn't any more, though.

-- Jame
-
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/