Am Montag, den 28.12.2009, 21:40 +0100 schrieb Andi Kleen:
OK i checked and they all use power-of-two currently so by sheer
luck (I doubt it is by design) they work. Still I think that
open deathtrap should be fixed.
It is fixed, and i hope it will be included in 2.6.34.
I also don't understand how that patch "breaks your future work"
Please elaborate on that.
Very difficult to explain in a email, but i will try it:
The new macro based kfifo API handles everything as elements of a given
type. So you can have the old "unsigned char"-fifo, but also fifo of
every other type like int's, struct's and so on. The kfifo_in() and
kfifo_out() len parameter is than in the meaning of elements not bytes.
So you are able to process more than one value at a time and the macros
will return the number of processed elements (not bytes).