Jay Schwichtenberg wrote: > I have hardware that in certain cases needs to have IO operations done > atomicly. Mainly in a DPC and in once case at startup. I'm talking at the HW > level and not the system level. Basicly these operations can not be > interrupted by anyone not OS, not timer, not keyboard..... A couple examples > are: programming FPGAs, in a multiple card system being able to write to > every cards start register without being interrupted to keep them > synchronized. Now days you can't just do the old pushfd, cli, .... popfd > which sucks. (There are some of us out here that can write real drivers and > not abuse the system.) From what I can tell all the spin lock stuff and > KeSynchronizeExecution just boost the IRQL to beyond the current cards > level. Maybe I might be wrong. If your card uses a hardware interrupt, you would want to use either KeSynchronizeExecution or IoAcquireInterruptSpinLock to serialize access to your card amongst your ISR and all other parts of your driver. These functions do *two* things on a multiprocessor system: they raise the IRQL and they acquire a spin lock associated with your interrupt. While one cpu holds the spin lock, no other cpu can claim the same lock. Hence, no other cpu can access your hardware. -- Walter Oney, Consulting and Training Basic and Advanced Driver Programming Seminars Now teaming with John Hyde for USB Device Engineering Seminars Check out our schedule at http://www.oneysoft.com ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/