diff options
author | Colin Yi <Colin.Yi@Sun.COM> | 2009-05-25 10:17:17 +0800 |
---|---|---|
committer | Colin Yi <Colin.Yi@Sun.COM> | 2009-05-25 10:17:17 +0800 |
commit | e8bb33d8a52501da2c03bbcb5fddf3239b74ad8c (patch) | |
tree | 94883abab6376fce3078fb698a6a0f0c2a885ca5 /usr/src/uts/common/sys/cpuvar.h | |
parent | 81d9ccb6366881724acaad97008e11a87a8a7bd6 (diff) | |
download | illumos-joyent-e8bb33d8a52501da2c03bbcb5fddf3239b74ad8c.tar.gz |
6826573 System crashing while installing snv_111
Diffstat (limited to 'usr/src/uts/common/sys/cpuvar.h')
-rw-r--r-- | usr/src/uts/common/sys/cpuvar.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/src/uts/common/sys/cpuvar.h b/usr/src/uts/common/sys/cpuvar.h index 99829bbb03..1493aa6a33 100644 --- a/usr/src/uts/common/sys/cpuvar.h +++ b/usr/src/uts/common/sys/cpuvar.h @@ -268,6 +268,20 @@ extern cpu_core_t cpu_core[]; #define CPU_ON_INTR(cpup) ((cpup)->cpu_intr_actv >> (LOCK_LEVEL + 1)) /* + * Check to see if an interrupt thread might be active at a given ipl. + * If so return true. + * We must be conservative--it is ok to give a false yes, but a false no + * will cause disaster. (But if the situation changes after we check it is + * ok--the caller is trying to ensure that an interrupt routine has been + * exited). + * This is used when trying to remove an interrupt handler from an autovector + * list in avintr.c. + */ +#define INTR_ACTIVE(cpup, level) \ + ((level) <= LOCK_LEVEL ? \ + ((cpup)->cpu_intr_actv & (1 << (level))) : (CPU_ON_INTR(cpup))) + +/* * CPU_PSEUDO_RANDOM() returns a per CPU value that changes each time one * looks at it. It's meant as a cheap mechanism to be incorporated in routines * wanting to avoid biasing, but where true randomness isn't needed (just |