Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IOTimerEventSource behavior



With regards the sample code offered for 'IOTimerEventSource behavior', I tried making use of it in my KEXT but the behavior is confusing.

SETUP FOR TIMER:
IOTimerEventSource::Action callback = (IOTimerEventSource::Action)&MY_CLASS_NAME::timeoutOccurred;
mTimerSource = IOTimerEventSource::timerEventSource(this, callback);


CALLBACK ACTIVITY:
MY_CLASS_NAME*  theOwner;

theOwner = OSDynamicCast( MY_CLASS_NAME, owner);
if(NULL != theOwner)
	{
	// never get here
	}

QUESTION:  Why doesn't the OSDynamicCast work as expected?

Thanks for your suggestions.

Lance Drake

// --------------------------------------------------
REFERENCE = Here's what's showing up in the log file:

1) Enable a timeout...
May 25 12:19:45 localhost kernel: com_my_driver_testcode: mTimerSource->setTimeoutMS()


2) 9 seconds later - enable again
May 25 12:19:54 localhost kernel: com_my_driver_testcode: mTimerSource->setTimeoutMS()


3) Not sure where this call to the timeout handler came from...
May 25 12:20:01 localhost kernel: com_my_driver_testcode:
	timeoutOccurred: theOwner came back NULL from OSDynamicCast()
	owner = 0x02FA6880, this = 0x02E81000

4) Where's the call to the handler expected at :45? - is it superceded by timeout call at :54 ?

5) This is the expected timeout from the latter call -
   but it does not appear to be from 'me'
May 25 12:20:54 localhost kernel: com_my_driver_testcode:
	timeoutOccurred: 'theOwner' came back NULL from OSDynamicCast()
	owner = 0x03752400, this = 0x02E81000

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.