Messages in this thread | | | Date | Tue, 02 Sep 2003 18:14:45 +1000 | From | Nick Piggin <> | Subject | Re: [PATCH] might_sleep() improvements |
| |
Mitchell Blank Jr wrote:
>Andrew - I thought this might be appropriate for -mm kernels. > >This patch makes the following improvements to might_sleep(): > > o Add a "might_sleep_if()" macro for when we might sleep only if some > condition is met. I think this is a bit better than the currently used > "if (cond) might_sleep();" since it's clearer that the test won't be > compiled in if spinlock sleep debugging is turned off. (Obviously > gcc is smart enough to omit simple conditions in that case) It also > looks cleaner, IMO. Think of it as analogous to BUG()/BUG_ON(). >
I think these should be pushed down to where the sleeping actually happens if possible.
- 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/
| |