lkml.org 
[lkml]   [2006]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: R/W semaphore changes
From
Date
On Tue, 2006-07-04 at 13:47 +0100, David Howells wrote:
> I see you've made some R/W semaphore changes...
>
> | /*
> | * nested locking:
> | */
>
> This comment is inadequate. Please be more explicit about when you're allowed
> to do this.
>
> | extern void down_read_nested(struct rw_semaphore *sem, int subclass);
> | extern void down_write_nested(struct rw_semaphore *sem, int subclass);
>
> Please, please, please don't. R/W semaphores are _not_ permitted to nest.

yet they do in places, there where there is a natural hierarchy..

> | # define down_read_nested(sem, subclass) down_read(sem)
> | # define down_write_nested(sem, subclass) down_write(sem)
>
> This is _not_ okay.

why not?



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

\
 
 \ /
  Last update: 2006-07-04 14:55    [W:0.146 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site