From d68566809953889b0ab75804e716ca84d3b84b2d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 4 Oct 1994 20:07:32 +0000 Subject: [PATCH] Add conditionalizations for OS/2. --- v7/src/microcode/intrpt.h | 32 +++++++++++++++++++++++++++----- v7/src/microcode/oscond.h | 4 ++-- v7/src/microcode/posixtyp.h | 12 ++++++++++-- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/v7/src/microcode/intrpt.h b/v7/src/microcode/intrpt.h index 970205adf..3239667a0 100644 --- a/v7/src/microcode/intrpt.h +++ b/v7/src/microcode/intrpt.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: intrpt.h,v 1.16 1993/10/14 19:23:18 gjr Exp $ +$Id: intrpt.h,v 1.17 1994/10/04 20:07:32 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-1994 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -95,30 +95,52 @@ MIT in each case. */ #define SET_INTERRUPT_MASK(mask) \ { \ + GRAB_INTERRUPT_REGISTERS (); \ (Registers[REGBLOCK_INT_MASK]) = ((SCHEME_OBJECT) (mask)); \ COMPILER_SETUP_INTERRUPT (); \ + RELEASE_INTERRUPT_REGISTERS (); \ } #define FETCH_INTERRUPT_CODE() ((long) (Registers[REGBLOCK_INT_CODE])) #define REQUEST_INTERRUPT(code) \ { \ + GRAB_INTERRUPT_REGISTERS (); \ (Registers[REGBLOCK_INT_CODE]) = \ ((SCHEME_OBJECT) ((FETCH_INTERRUPT_CODE ()) | (code))); \ COMPILER_SETUP_INTERRUPT (); \ + RELEASE_INTERRUPT_REGISTERS (); \ } #define CLEAR_INTERRUPT(code) \ { \ + GRAB_INTERRUPT_REGISTERS (); \ (Registers[REGBLOCK_INT_CODE]) = \ ((SCHEME_OBJECT) ((FETCH_INTERRUPT_CODE ()) &~ (code))); \ COMPILER_SETUP_INTERRUPT (); \ + RELEASE_INTERRUPT_REGISTERS (); \ } #define INITIALIZE_INTERRUPTS() \ { \ - (Registers[REGBLOCK_INT_MASK]) = ((SCHEME_OBJECT) 0); \ + GRAB_INTERRUPT_REGISTERS (); \ + (Registers[REGBLOCK_INT_MASK]) = ((SCHEME_OBJECT) INT_Mask); \ (Registers[REGBLOCK_INT_CODE]) = ((SCHEME_OBJECT) 0); \ - SET_INTERRUPT_MASK (INT_Mask); \ - CLEAR_INTERRUPT (INT_Mask); \ + COMPILER_SETUP_INTERRUPT (); \ + RELEASE_INTERRUPT_REGISTERS (); \ } + +#if defined(_OS2) + +#define GRAB_INTERRUPT_REGISTERS() OS_grab_interrupt_registers () +#define RELEASE_INTERRUPT_REGISTERS() OS_release_interrupt_registers () + +extern void OS_grab_interrupt_registers (void); +extern void OS_release_interrupt_registers (void); + +#else /* not _OS2 */ + +#define GRAB_INTERRUPT_REGISTERS() +#define RELEASE_INTERRUPT_REGISTERS() + +#endif /* _OS2 */ diff --git a/v7/src/microcode/oscond.h b/v7/src/microcode/oscond.h index 631cb4fc7..f9d0f95c4 100644 --- a/v7/src/microcode/oscond.h +++ b/v7/src/microcode/oscond.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: oscond.h,v 1.16 1994/10/04 20:04:48 cph Exp $ +$Id: oscond.h,v 1.17 1994/10/04 20:05:16 cph Exp $ -Copyright (c) 1990-1993 Massachusetts Institute of Technology +Copyright (c) 1990-1994 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and diff --git a/v7/src/microcode/posixtyp.h b/v7/src/microcode/posixtyp.h index 61aad7e32..9710df144 100644 --- a/v7/src/microcode/posixtyp.h +++ b/v7/src/microcode/posixtyp.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: posixtyp.h,v 1.9 1993/11/11 20:18:48 cph Exp $ +$Id: posixtyp.h,v 1.10 1994/10/04 20:05:57 cph Exp $ -Copyright (c) 1990-1993 Massachusetts Institute of Technology +Copyright (c) 1990-1994 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -103,6 +103,14 @@ MIT in each case. */ /*#define _CC_T*/ #endif +#if defined(_OS2) && defined(__IBMC__) +#include +#include +#define _TIME_T +#define _OFF_T +#define _SIZE_T +#define _CLOCK_T +#endif /* _OS2 && __IBMC__ */ #ifndef _MODE_T #define _MODE_T -- 2.25.1