Re: [PATCH] dm.c - device-mapper I/O path fixes

From: Paul Mackerras (
Date: Wed Dec 11 2002 - 16:12:24 EST

Kevin Corry writes:

> Storing an int is *not* atomic unless it is declared as atomic_t and you use
> the appropriate macros (see include/asm-*/atomic.h). Remember, we are talking
> about a field in a data structure that can be accessed from multiple threads
> on multiple CPUs.

As a practical matter, I believe that storing an int to an int-aligned
address _is_ actually atomic on any CPU that can run Linux. The
PowerPC architecture spec requires that single-word (i.e. 32-bit)
aligned stores are atomic, for instance, and I think that would be the
case on any other sane architecture as well.

The language lawyers would probably agree with you, though.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:23 EST