diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-09-06 19:29:51 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-09-06 19:29:51 +0000 |
commit | c57bdaabf7d36c869812821626ad6046457621aa (patch) | |
tree | 99fb97fe3582206a7709ed03a938fa42b198d4c0 /pfinet/asm | |
parent | c2706d4e69e632d3fdd705b7d9d3fdac565527e2 (diff) |
Formerly system.h.~8~
Diffstat (limited to 'pfinet/asm')
-rw-r--r-- | pfinet/asm/system.h | 79 |
1 files changed, 5 insertions, 74 deletions
diff --git a/pfinet/asm/system.h b/pfinet/asm/system.h index 19d181c5..dacd6ea1 100644 --- a/pfinet/asm/system.h +++ b/pfinet/asm/system.h @@ -1,79 +1,10 @@ #ifndef _HACK_ASM_SYSTEM_H_ #define _HACK_ASM_SYSTEM_H_ -#include <cthreads.h> -#include <sys/types.h> - -#define intr_count (_fetch_intr_count ()) - -/* This lock is held when "interrupts" are disabled. */ -extern struct mutex global_interrupt_lock; - -/* Save the "processor state" in the longword FLAGS. */ -/* We define 1 to mean that global_interrupt_lock is held. */ - -#define save_flags(x) _real_save_flags (&x) -extern inline void -_real_save_flags (u_long *flagsword) -{ - int locked; - - locked = !mutex_try_lock (&global_interrupt_lock); - if (!locked) - mutex_unlock (&global_interrupt_lock); - *flagsword = locked; -} - -/* Restore state saved in FLAGS. */ -extern inline void -restore_flags (u_long flags) -{ - if (flags) - mutex_try_lock (&global_interrupt_lock); - else - mutex_unlock (&global_interrupt_lock); -} - -/* Prevent "interrupts" from happening. */ -extern inline void -cli () -{ - mutex_try_lock (&global_interrupt_lock); -} - -/* Permit "interrupts". */ -extern inline void -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? */ -} - -/* Return one if we are in interrupt code. */ -extern inline int -_fetch_intr_count () -{ - u_long locked; - - _real_save_flags (&locked); - return locked; -} +#define intr_count 0 +#define save_flags(x) +#define restore_flags(x) +#define cli() +#define sti() #endif |