Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_osdep.h
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | |||||
#define E1000_WRITE_FLASH_REG(hw, reg, value) \ | #define E1000_WRITE_FLASH_REG(hw, reg, value) \ | ||||
bus_space_write_4(((struct e1000_osdep *)(hw)->back)->flash_bus_space_tag, \ | bus_space_write_4(((struct e1000_osdep *)(hw)->back)->flash_bus_space_tag, \ | ||||
((struct e1000_osdep *)(hw)->back)->flash_bus_space_handle, reg, value) | ((struct e1000_osdep *)(hw)->back)->flash_bus_space_handle, reg, value) | ||||
#define E1000_WRITE_FLASH_REG16(hw, reg, value) \ | #define E1000_WRITE_FLASH_REG16(hw, reg, value) \ | ||||
bus_space_write_2(((struct e1000_osdep *)(hw)->back)->flash_bus_space_tag, \ | bus_space_write_2(((struct e1000_osdep *)(hw)->back)->flash_bus_space_tag, \ | ||||
((struct e1000_osdep *)(hw)->back)->flash_bus_space_handle, reg, value) | ((struct e1000_osdep *)(hw)->back)->flash_bus_space_handle, reg, value) | ||||
#if defined(INVARIANTS) | |||||
#include <sys/proc.h> | |||||
#define ASSERT_NO_LOCKS() \ | |||||
do { \ | |||||
int unknown_locks = curthread->td_locks - mtx_owned(&Giant); \ | |||||
if (unknown_locks > 0) { \ | |||||
WITNESS_WARN(WARN_GIANTOK|WARN_SLEEPOK|WARN_PANIC, NULL, "unexpected non-sleepable lock"); \ | |||||
} \ | |||||
MPASS(curthread->td_rw_rlocks == 0); \ | |||||
MPASS(curthread->td_lk_slocks == 0); \ | |||||
} while (0) | |||||
#else | |||||
#define ASSERT_NO_LOCKS() | |||||
#endif | |||||
#endif /* _FREEBSD_OS_H_ */ | #endif /* _FREEBSD_OS_H_ */ | ||||