Probably printk should have another format added that specifically works
on `counter_t' types.
The amount to increment is a 32-bit quantity on 32-bit platforms (or
larger if supplied, the macro can work out the details). I know this
would be quite efficient on i386, and of course 64-bit cpus. I don't
know about other architectures.
I've suggested the macro expands to code `addl amount,counter; adcl
$0,counter+4' on i386, avoiding GCC's problems generating good 64 bit
code. It should do the appropriate thing with other archs too.
But now, I've come up with something that is probably faster. And it
can also be extended to 128 bits etc. without slowdown:
0: addl $1,counter+4
This one only works when `amount' is a 32 bit type or less, which will
be the usual case. I propose the `increment_counter' macro look at the
sizeof its arguments to decide which code to emit.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html