Mailing Lists: Apple Mailing Lists

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

Re: Confusion over drivers vs. driver interfaces



Hi Steve,

You raise some valid points. If you're serious about Apple enngineering looking at this, please file an enhancement request at <http://developer.apple.com/bugreporter>.

Thanks,
--gc

On Wednesday, January 22, 2003, at 11:36  AM, Steve Ehrenfried wrote:

For example, if I was trying to write an
application that interacted
with a Palm or some other handheld device that
connects via USB,
should I be looking into kernel extensions or using
a driver
interface based on the USB family?

That would be a user land driver. One of the magic words is "application", you're starting with a user land application, it can do it all without getting into the kernel.

This is true, but user land drivers aren't exactly
Nirvana. In fact, there really isn't an architecture
for "user land drivers"; there is just the IO Kit APIs
which you can use from an application/user-land space.
One gotcha is that you may have to deal with user-mode
USB device arbitration (see
http://developer.apple.com/techpubs/macosx/Darwin/IOKit/ DeviceInterfaces/USB/ClassicUSBDeviceArb.html
for more details).


More importantly, there is really no general
architecture for user-land drivers specified by Apple,
so if you want to package your user-land driver code
to make it available to other applications, you're
going to have to "roll your own" mechanism. How do
other applications, especially third-party apps, find
your driver so that they can re-use what you've
developed? All of Apple's examples of calling IOKit
APIs from user-land are in the context of an
application/tool.

Also, suppose you want your user-land driver to get
loaded whenever a USB device gets plugged in, there's
nothing in the OS that will do it automatically for
you, i.e. there's no registry for user-land drivers.
Again, you'll have to write your own code to do this
(I wound up having to write a small app that is a
wrapper around my driver and that runs as a Startup
Item).

Just some things to think about. It's in Apple's best
interest to push for user-land drivers since they're
not liable to destabilize the kernel in the same way
that kernel-mode drivers can, and I'm not really
critisizing the existing architecture, but I think
Apple should consider doing more development to make
life simpler from user-land. It sometimes seems like
developing a user-land driver can be more work from a
developer's point of view.

-Steve


--
Barry Twycross
email@hidden
                      ---
          USB, it's not a Dyslexic BUS.
(Thanks to TC.)
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be
ignored.
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Confusion over drivers vs. driver interfaces (From: Steve Ehrenfried <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.