From 2e3591e5d88e321aa26063dfa0d8f736240fb39f Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 9 Aug 1995 15:07:41 +0000 Subject: Formerly system.h.~5~ --- pfinet/asm/system.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pfinet') diff --git a/pfinet/asm/system.h b/pfinet/asm/system.h index 4dfc74e7..bb51a6fb 100644 --- a/pfinet/asm/system.h +++ b/pfinet/asm/system.h @@ -46,4 +46,24 @@ sti () mutex_unlock (&global_interrupt_lock); } +/* In threads set aside to be interrupt threads, they call this + before doing any real work, thus putting us into "interrupt" + mode. */ +extern inline void +begin_interrupt () +{ + mutex_lock (&global_interrupt_lock); + /* Should we suspend the current "user thread"? */ +} + +/* And then this, at the end of the real work. */ +extern inline void +end_interrupt () +{ + mutex_unlock (&global_interrupt_lock); + /* Likewise a resumption? */ +} + + + #endif -- cgit v1.2.3