Mailinglist Archive: opensuse-kernel (109 mails)

< Previous Next >
Re: [opensuse-kernel] novfs: replace MUTEX by sema functions
  • From: Jan Engelhardt <jengelh@xxxxxxxxxx>
  • Date: Sun, 7 Mar 2010 18:02:06 +0100 (CET)
  • Message-id: <alpine.LSU.2.01.1003071801180.24715@xxxxxxxxxxxxxxx>
On Sunday 2010-03-07 17:56, Jean Delvare wrote:

On Sunday 07 March 2010 04:35:58 pm Jan Engelhardt wrote:
On Sunday 2010-03-07 14:56, Bernhard Walle wrote:
So you replaced the old DECLARE_MUTEX() (which is actually a binary
semaphore as Jean mentioned) with struct semaphore. Which is not wrong,
of course. But it shows that the semaphore was used as mutex, so I don't
see a problem with using the new Mutex API as Jean mentioned.

You would have to check whether the sema is held in sleeping, which
newmutexes are not allowed to.

How that, please? I use "new" mutexes in many drivers, and they do sleep, and
this has never been a problem, nor has anyone ever told me this was incorrect.
Care to backup your claim? include/linux/mutex.h doesn't mention sleeping
constraints at all.

Not sleep; but whatever was written in Documentation/mutexes.txt.
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx

< Previous Next >