retry: ldd [xtime], %reg1 /* load all 8 bytes of xtime */
ld [timer_reg], %reg2 /* snapshot timer counter */
ldd [xtime], %reg3 /* load second copy of xtime */
cmp %reg1, %reg3 /* Did it change in between? */
bne retry /* Yep, try once more */
nop
No locks, no interrupt disabling, etc. I suppose using this technique
would be extremely troublesome if the architecture in question has no
method to load an aligned doublet of time_t's at once. But I believe
ix86 actually can.
Perhaps this solves a different problem than the one you are
tackling...
Later,
David S. Miller
davem@redhat.com
-
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/