WARNING: mutexes are preferred for single holder semaphores

Sean MacLennan seanm at seanm.ca
Mon May 5 14:40:23 EST 2008


On Mon, 05 May 2008 13:38:39 +1000
"Benjamin Herrenschmidt" <benh at kernel.crashing.org> wrote:

> Show us the code... It could be a bug in checkpatch or you using 
> the wrong functions somewhere ...

The change to DEFINE_MUTEX and changing up/down to
mutex_lock/mutex_unlock solved the problem.

The code is GPLed but not currently available on the net. It is
basically a little driver that registers a character device and
then passes out the minor numbers to the PIKA board drivers.

It was written to isolate all the character/sysfs code to one place
since we have five drivers, and many debug drivers, that use it.

If anybody is really interested, I can post it here. I doubt it will
ever be submitted to the mainline kernel however.

Cheers,
   Sean



More information about the Linuxppc-dev mailing list