lkml.org 
[lkml]   [1999]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i386 rw semaphore + use for mmap_sem


On Mon, 22 Nov 1999, Marcelo Tosatti wrote:
>
> Your code wakes up all writers (if there are any) in read_up.
> Since just one writer will get the lock, i think its more interesting to
> wake one process.

DON'T DO THIS!

We have a perfectly fine "wake_one()" facility in the form of
TASK_EXCLUSIVE, which can handle all the wake-one cases correctly. Don't
add a new wake_up_one() thing for this.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.024 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site