Re: [PATCH] (Updated) Preemptible Kernel

Daniel Phillips (phillips@bonn-fries.net)
Fri, 7 Sep 2001 03:10:56 +0200


On September 6, 2001 10:39 pm, Phillip Susi wrote:
> ... what happens if
> say, the kernel called from user space is holding a lock, and gets preempted?

The thread will eventually get rescheduled and release the lock.

> Is there a mechanism to disable preemption while holding locks or at other
> resources that need to be freed before another task is run?

IIRC spinlocks inhibit scheduling, the simplest way to handle that.

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