Incrementing a 64-bit value on i386 is fast and simple. It's arithmetic
done in GCC, especially with temporaries that you have to worry about.
The instruction sequence is:
incl counter
adcl $0,counter+4
This could be made into a kernel macro. Because the carry is so rare,
you could safely use a lock prefix before the incl and put this in a
macro called atomic_count or something.
-- Jamie
-
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.altern.org/andrebalsa/doc/lkml-faq.html