From b5568670fb475bee88df1ac78ab3a37574d32a8f Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 16 Aug 1995 16:10:35 +0000 Subject: Formerly system.h.~6~ --- pfinet/asm/system.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pfinet/asm') diff --git a/pfinet/asm/system.h b/pfinet/asm/system.h index bb51a6fb..1170c82a 100644 --- a/pfinet/asm/system.h +++ b/pfinet/asm/system.h @@ -4,6 +4,8 @@ #include #include +#define intr_count (_fetch_intr_count ()) + /* This lock is held when "interrupts" are disabled. */ extern struct mutex global_interrupt_lock; @@ -64,6 +66,14 @@ end_interrupt () /* Likewise a resumption? */ } - +/* Return one if we are in interrupt code. */ +extern inline +_fetch_intr_count () +{ + u_long locked; + + _real_save_flags (&locked); + return locked; +} #endif -- cgit v1.2.3