What exactly is the prototype for timeoutOccurred?
This is the code fragment from the timer event source callout
(*doit)(me->owner, me);
doit is a pointer to a function
me is the pointer to the IOTimerEventSource
me->owner is your 'this' pointer.
Hi Godfrey -
It appears that what's coming back is the IOTimerEventSource*.
I was expecting a ptr to 'this' but I can certainly use a comparison
of the IOTimerEventSource* that is sent in to see if it matches the
one I created - thus confirming the source of the timeout.
As you can see from the SNIPs below - I tried two different prototypes
and got the same results for both: the first arg being the one in which
I am interested.
After running these tests multiple times and getting consistent results
I am still scratching my head when comparing what I am seeing to your
explanation of what is happening. If you can shed any light as to
why the discrepancy exists, that would be great.
Your interest in my question is very much appreciated. Best Regards,
RESULTS IN SYSLOG: After a one minute timeout sequence
May 26 22:59:31 localhost kernel: com_my_text_kext:
mTimerSource->setTimeoutMS()
May 26 23:00:31 localhost kernel: com_my_text_kext: timeoutOccurred:
owner = 0x037D7940, (== mTimerSource)
sender = 0x00000000,
this = 0x02E90000,