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: How To Do Locking Right?



Dirk Musfeldt (email@hidden) wrote on Tue, 28 Jan
2003 22:36:22 +0100:

>I have a vendor-supplied HAL for my device which has an OS-independent
>synchronization mechanism.

Not independent enough I'm afraid.

> That mechanism uses KeSynchronizeExecution() on
>Windows.
>
>I tried to implement that with calls to IOSimpleLockLock() and
>IOSimpleLockUnlock(). That works on uniprocessor Macs but is not reliable on
>MP machines.
>
>What is the correct mechanism to implement that in a kext?

I'm not a Windows API expert, but I'm pretty sure there is no direct
analogue to KeSynchronizeExecution. Its just not going to be as easy as
finding an API with a different name that does the same thing.

Mac drivers don't have exact analogues of DPC's and all that stuff. You
should read up on IOWorkloop.

Good luck!

--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer +1-514-822-6000 x7399
Matrox Electronic Systems Ltd. Montrial, Quibec, Canada
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.



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.