Re: Yielding the processor in a kext?
Re: Yielding the processor in a kext?
- Subject: Re: Yielding the processor in a kext?
- From: Michael Smith <email@hidden>
- Date: Thu, 6 Sep 2007 19:55:05 -0700
On Sep 6, 2007, at 5:03 PM, Régis Duchesne wrote:
Is there a way to make the current thread yield the processor in a
kext?
Not in the fashion you describe. If you have work, do it. If the
scheduler has more important work that has to be done, it will take
the CPU away from your thread.
I understand that by default threads executing in the kernel are
pre-emptable, but sometimes I would like the current thread to
explicitly give the scheduler a chance to schedule another thread,
before the current thread's timeslice has elapsed. I'm looking for
something similar to cond_resched() on Linux.
The only reason to want to do this is if you are performing a long-
running low priority task on the wrong (high-priority) thread.
Don't do that. Do the work on a thread whose priority reflects the
true priority of the task. It's not your business to make scheduling
decisions; don't even try.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden