Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-06-01 Thread Matthias Kaehlcke
El Thu, May 31, 2007 at 03:37:12PM -0700 Andrew Morton ha dit: > On Thu, 31 May 2007 15:42:26 +0200 > Matthias Kaehlcke <[EMAIL PROTECTED]> wrote: > > > drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore > > > > hm. > > > > > We end up with this: > > /* find a device

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-06-01 Thread Matthias Kaehlcke
El Thu, May 31, 2007 at 03:37:12PM -0700 Andrew Morton ha dit: On Thu, 31 May 2007 15:42:26 +0200 Matthias Kaehlcke [EMAIL PROTECTED] wrote: drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore hm. We end up with this: /* find a device that is not in

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Andrew Morton
On Thu, 31 May 2007 15:42:26 +0200 Matthias Kaehlcke <[EMAIL PROTECTED]> wrote: > drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore > hm. > > -- > > diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c > index 7a32df5..ff27587 100644 > --- a/drivers/char/tty_io.c >

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Christoph Hellwig
On Thu, May 31, 2007 at 03:42:26PM +0200, Matthias Kaehlcke wrote: > drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore Looks good. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Matthias Kaehlcke
drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..ff27587 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -137,7 +137,7 @@

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Matthias Kaehlcke
drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore Signed-off-by: Matthias Kaehlcke [EMAIL PROTECTED] -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..ff27587 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -137,7 +137,7 @@

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Christoph Hellwig
On Thu, May 31, 2007 at 03:42:26PM +0200, Matthias Kaehlcke wrote: drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore Looks good. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-05-31 Thread Andrew Morton
On Thu, 31 May 2007 15:42:26 +0200 Matthias Kaehlcke [EMAIL PROTECTED] wrote: drivers/char/tty_io.c: Use spinlock instead of a (binary) semaphore hm. -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..ff27587 100644 --- a/drivers/char/tty_io.c +++

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Andrew Morton
On Wed, 25 Apr 2007 20:13:59 +0100 Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: > > drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API > > instead of the (binary) semaphore > > This looks like it should be a

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Christoph Hellwig
On Wed, Apr 25, 2007 at 09:46:33PM +0200, Matthias Kaehlcke wrote: > thanks for your remarks. is the following patch what you are > proposing? Yes, exactly. Looks good to me this way.:w - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
El Wed, Apr 25, 2007 at 08:13:59PM +0100 Christoph Hellwig ha dit: > On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: > > drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API > > instead of the (binary) semaphore > > This looks like it should be a spinlock: > > >

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Christoph Hellwig
On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: > drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API > instead of the (binary) semaphore This looks like it should be a spinlock: > - down(_ptys_lock); > + mutex_lock(_ptys_lock); >

[PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]> -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..4496fd2 100644 --- a/drivers/char/tty_io.c +++

[PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke [EMAIL PROTECTED] -- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7a32df5..4496fd2 100644 --- a/drivers/char/tty_io.c +++

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Christoph Hellwig
On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore This looks like it should be a spinlock: - down(allocated_ptys_lock); +

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Matthias Kaehlcke
El Wed, Apr 25, 2007 at 08:13:59PM +0100 Christoph Hellwig ha dit: On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore This looks like it should be a spinlock: -

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Christoph Hellwig
On Wed, Apr 25, 2007 at 09:46:33PM +0200, Matthias Kaehlcke wrote: thanks for your remarks. is the following patch what you are proposing? Yes, exactly. Looks good to me this way.:w - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL

Re: [PATCH] use mutex instead of semaphore in tty_io.c

2007-04-25 Thread Andrew Morton
On Wed, 25 Apr 2007 20:13:59 +0100 Christoph Hellwig [EMAIL PROTECTED] wrote: On Wed, Apr 25, 2007 at 05:49:34PM +0200, Matthias Kaehlcke wrote: drivers/char/tty_io.c uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore This looks like it should be a spinlock: