addNotification in 10.2
addNotification in 10.2
- Subject: addNotification in 10.2
- From: "Daniel-Olivier Simard" <email@hidden>
- Date: Tue, 3 Sep 2002 09:46:22 -0400
I have written code that was working on Mac OS 10.1 that was using the
addNotification function. When I tried it on 10.2 the same code produced some
weird results.
My code is an IOService (classA) that is waiting on another (classB) by
defining a property into the IORegistry. When classB starts, it writes the
regkey and register him-self. The classA addNotification on
gIOFirstMatchNotification with a dictionary that contains the regkey. On 10.1
my classA was deblocking only when the classB was registering, but on 10.2 the
classA deblock several times event if the classB is not already registered.
Here is my code:
classA:
OSDictionary* pDict = OSDictionary::withCapacity(1);
pDict->setObject("regkey", "string");
IONotifier* pNotifier = addNotification(gIOFirstMatchNotification, pDict,
classA::NotificationHandler, this);
classB:
setProperty("regkey", "string");
registerService();
I have also tried with resourceMatching("regkey") instead of using a custom
dictionary, and my classA::Notificationhandler is not event deblocking when I
start the classB.
Can you tell me why this code is not working on 10.2 like on 10.1 ?
Is there another way to wait on an IOService based on a custom dictionary or a
resource ?
Daniel-Olivier Simard, ing.
Kernel developer
Matrox Electronic Systems Ltd
Tel: (514) 822-6000 ext. 7899
Fax: (514) 822-6024
Email: email@hidden
_______________________________________________
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.