Re: Re: Threads within the kernel
Re: Re: Threads within the kernel
- Subject: Re: Re: Threads within the kernel
- From: Quinn <email@hidden>
- Date: Wed, 13 Dec 2006 11:44:52 +0000
At 9:53 -0500 12/12/06, Curtis Jones wrote:
So, how do I go about starting a low priority thread? Is there another
bsd_timeout() like function?
I'm not sure what the /best/ answer to this is. However, an answer
that will work (probably :-) is to start a new kernel thread and then
explicitly set its priority using thread_policy_set. You can start
kernel threads in a variety of ways.
o Mach exports kernel_thread_start
o I/O Kit exports IOCreateThread
Which you should use depends on the environment you're working in.
If you're knee deep in I/O Kit, IOCreateThread would be best. If
you're just using BSD, the Mach routine would be best.
Be careful to avoid KPIs where you don't exclusively own the
underlying thread (like bsd_timeout and the thread call KPI
</kern/thread_call.h>). Changing the priority on system threads is
not a good idea.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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