Would you please, Daniel, explain why there are so my file systems underthe fs directory? Would you think the ext file system is better than others?

And why there are in kernel spin lock, read/write lock, mutex, rw_mutex,rtmutx, and semaphore, timer and hrtimer?

Could timer be removed tonight?

>> Yes. I once even tried unifying the semaphore and rwsem implementation,> but gave up on that for a number of reasons.

It looks hard to change rwsem, almost impossible, since it is based uponasm, at least under the x86 dir.

>>> It should also be noted that the rtmutex (kernel/rtmutex.c) already has>> this capability. Although I don't think you can use an rtmutex from>> inside the kernel.>> I wasn't aware we had already grown another one ;-)>> AFAICT, you can only use it inside of the kernel, but it's very> specific and I wouldn't recommend using it unless a regular mutex> cannot be used for some reason. The only user besides the futex> code seems to be the i2c layer at this moment.>>> If you really want this you should look into the rtmutex, and the>> regular mutex API's .>

But greping "struct semaphore" include/linux and fs dirs may tell usmore about semaphore.

> If Hillf relies on counting semaphores, that won't work, but very> few such users exist in code outside of textbooks.>

Though capable in rtmutex, why mutex should no longer stay in Kernel?

However mutex could be changed based on hrtimer if needed for some reason.