Re: Timers in my NKE
Re: Timers in my NKE
- Subject: Re: Timers in my NKE
- From: Matt Jaffa <email@hidden>
- Date: Thu, 17 Jun 2004 14:26:31 -0600
hmmm I found a pretty good method for accomplishing my purposes, unless
it isn't a good way.
use IOCreateThread to create the thread and run it,
then inside the thread function I call IOSleep(timetosleep);
then so the work after the thread wakes up.
If I read correctly these are just wrappers for the mach_threads, and I
guess IOKit knows threads better to me, so I will let that API take
care of it, as long as this API is going to be staying along time.
I don't really care if the thread wakes up anywhere from 1 to 10000
milliseconds off from what I told it to sleep, so this method should
work for me, unless there is a suggested and recommended way.
Matt
On Jun 17, 2004, at 12:30 PM, Godfrey van der Linden wrote:
G'day Justin,
You are right it is
#include <kern/thread_call.h> // And can be found in xnu/osfmk/kern
It sort of depends on what you want to do with the timeou()t. But for
regularly scheduled timeouts I prefer using thread_call_enter directly
as it is lighter weight and closer to my requirements.
Godfrey
On Jun 17, , at 10:38, Justin Walker wrote:
On Jun 17, 2004, at 10:11, Godfrey van der Linden wrote:
Check out <xnu/kern/thread_call.h>
Huh? I don't find such a file. What about a 'timeout()' call?
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.