added locking

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4743 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-09-17 20:44:10 +00:00
parent 1f63572715
commit f120b01748

View File

@ -20,3 +20,15 @@ void pci_write_irq(uint8 bus, uint8 device, uint8 function, uint8 line, uint8 i
extern int gMaxBusDevices;
extern bool gIrqRouterAvailable;
#define PCI_LOCK_CONFIG(status) \
{ \
status = disable_interrupts(); \
acquire_spinlock(&gConfigLock); \
}
#define PCI_UNLOCK_CONFIG(cpu_status) \
{ \
release_spinlock(&gConfigLock); \
restore_interrupts(cpu_status); \
}