Re: [PATCH] shm_destroy lock hang

David Schwartz (davids@webmaster.com)
Thu, 27 Jun 2002 13:24:14 -0700


>Just please avoid doing that locking nastyness:
>
>function() {
>unlock();
>}
>
>
>lock();
>if (something)
> function();
>else
> unlock();

What do you do in cases where 'function' looks like this:

function() {
something();
unlock();
something_else();
}

DS

-
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/