lkml.org 
[lkml]   [2003]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] might_sleep() improvements
Robert Love wrote:
> > o Add a "might_sleep_if()" macro for when we might sleep only if some
> > condition is met.
>
> But I am neutral about this.

That's understandable - I have some of the same reservations myself. In
the end I think it's a slight win though.

> Maybe
> renaming this "might_sleep_on()" at least brings it more in line with
> BUG_ON(), and avoids looking like the gross constructs I fear.

I named it that at first but I was afraid that someone might get confused
and thing the semantics were "might_sleep_on(&waitqueue)" since 'sleeping
on' means something already. To me might_sleep_if(cond) looked a lot
clearer at first glance.

-Mitch
-
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/
Robert Love wrote:
> > o Add a "might_sleep_if()" macro for when we might sleep only if some
> > condition is met.
>
> But I am neutral about this.

That's understandable - I have some of the same reservations myself. In
the end I think it's a slight win though.

> Maybe
> renaming this "might_sleep_on()" at least brings it more in line with
> BUG_ON(), and avoids looking like the gross constructs I fear.

I named it that at first but I was afraid that someone might get confused
and thing the semantics were "might_sleep_on(&waitqueue)" since 'sleeping
on' means something already. To me might_sleep_if(cond) looked a lot
clearer at first glance.

-Mitch
-
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: 2005-03-22 13:48    [W:0.068 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site