Mailing Lists: Apple Mailing Lists

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

ordering calls to driver's ::start() routine?



I'm working on an IOKit driver for a PCI device. I'm matching on
device id / vendor id in info.plist.

All was well until I added a second card to the machine (dual g4).
When I did this, I noticed that my start() routine was being called in
parallel. This is bad because all units share some common data. To
fix this, I "locked" the start routine.

However, I'm now having a problem where the start() routine is
called in a somewhat random order. By this I mean that most times
<device>@12 makes it into the start() routine first, but sometimes
<device>@14 wins the race. This is a problem because the first
device through my start() routine ends up as unit 0, the second as
unit 1, etc. I'd really like to keep these unit numbers
consistant across reboots.

Is there an easy way to make this deterministic?

Thanks in advance for your suggestions,

Drew




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.