I don't know why this cast was added, but it doesn't enforce atomicity on
SMP computers. _If_ we really need the atomicity, then something like this
could fix the problem:
- unsigned long volatile jiffies = 0;
+atomic_t atomic_jiffies = ATOMIC_INIT(0);
+ #define INC_JIFFIES() atomic_inc(&atomic_jiffies);
+ #defien ADD_JIFFIES(inc) atomci_add(&atomic_jiffies,inc);
+ #define jiffies ((unsigned long) atomic_get(&atomic_jiffies));
Warning: I never tried that, I didn't check if it will be correct on 64-bit
archs, ...
--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/