extern void preserve_signal_mask (void);
-struct interruptable_extent * current_interruptable_extent;
+__thread struct interruptable_extent * current_interruptable_extent;
void
initialize_interruptable_extent (void)
int interrupted;
};
-extern struct interruptable_extent * current_interruptable_extent;
+extern __thread struct interruptable_extent * current_interruptable_extent;
extern void initialize_interruptable_extent (void);
extern void reset_interruptable_extent (void);
extern struct interruptable_extent * enter_interruptable_extent (void);
extern int OS_under_emacs_p (void);
extern void OS_initialize (void);
+#ifdef ENABLE_SMP
+extern void OS_initialize_processor (void);
+#endif
extern void OS_reset (void);
extern void OS_quit (int code, int abnormal_p);
extern void OS_restartable_exit (void);
#ifdef ENABLE_SMP
#include "history.h"
+#include "ostop.h"
#include "osio.h"
#include "ossmp.h"
#include "osproc.h" /* for OS_process_any_status_change */
assert (self != processors);
initialize_processor_early ();
reset_processor_allocator (self);
+ OS_initialize_processor ();
RESET_HISTORY ();
/* expr: (SMP-PAUSE) */
extern void UX_initialize_processes (void);
extern void UX_initialize_signals (void);
extern void UX_initialize_terminals (void);
+extern void UX_initialize_trap_state (void);
extern void UX_initialize_trap_recovery (void);
extern void UX_initialize_tty (void);
extern void UX_initialize_userio (void);
}
void
-OS_initialize (void)
+OS_initialize_processor (void)
{
initialize_interruptable_extent ();
+ UX_initialize_trap_state ();
+}
+
+void
+OS_initialize (void)
+{
{
interactive =
(option_force_interactive
UX_initialize_processes ();
UX_initialize_trap_recovery ();
UX_initialize_directory_reader ();
+ OS_initialize_processor ();
OS_Name = SYSTEM_NAME;
OS_Variant = SYSTEM_VARIANT;
#if defined(_SUNOS) || defined(_SUNOS3) || defined(_SUNOS4)
# define SPECIAL_SIGNAL_CODE_NAMES()
#endif
-static enum trap_state trap_state;
-static enum trap_state user_trap_state;
-static enum trap_state saved_trap_state;
-static int saved_signo;
-static SIGINFO_T saved_info;
-static SIGCONTEXT_T * saved_scp;
+static __thread enum trap_state trap_state;
+static __thread enum trap_state user_trap_state;
+static __thread enum trap_state saved_trap_state;
+static __thread int saved_signo;
+static __thread SIGINFO_T saved_info;
+static __thread SIGCONTEXT_T * saved_scp;
static void continue_from_trap
(int, SIGINFO_T, SIGCONTEXT_T *);
static void trap_recover (void);
\f
void
-UX_initialize_trap_recovery (void)
+UX_initialize_trap_state (void)
{
trap_state = trap_state_recover;
user_trap_state = trap_state_recover;
+}
+
+void
+UX_initialize_trap_recovery (void)
+{
initialize_ux_signal_codes ();
}
};
extern void UX_initialize_trap_recovery (void);
+extern void UX_initialize_trap_state (void);
extern enum trap_state OS_set_trap_state (enum trap_state state);
extern void hard_reset (SIGCONTEXT_T * scp);
extern void soft_reset (void);