It could be done without much pain for both "official" and your rwsem
implementations.
However, there are 3 reasons why I prefer 16-bit counters:
a. "max user processes" ulimit is much lower than 64K anyway;
b. "long" count would cost extra 8 bytes in the struct rw_semaphore;
c. I can use existing atomic routines which deal with ints.
Actually I'm more anxious about a __builtin_expect() problem,
and I'd like to hear Richard's comment on this...
Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/