Add conditionalizations for OS/2.
authorChris Hanson <org/chris-hanson/cph>
Tue, 4 Oct 1994 20:07:32 +0000 (20:07 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 4 Oct 1994 20:07:32 +0000 (20:07 +0000)
v7/src/microcode/intrpt.h
v7/src/microcode/oscond.h
v7/src/microcode/posixtyp.h

index 970205adfca3d5ada791634402202d98a924955e..3239667a00ef42b31dc27ed78a618602e810355a 100644 (file)
@@ -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 */
index 631cb4fc71488708d9a1bd8142c3c28137409835..f9d0f95c4fd8aa74b1875aedf44504e907ad8547 100644 (file)
@@ -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
index 61aad7e3273a80443faa05b02f28f9b449b45551..9710df144810e06e26750ccf32de6d90571a5804 100644 (file)
@@ -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 <sys/types.h>
+#include <time.h>
+#define _TIME_T
+#define _OFF_T
+#define _SIZE_T
+#define _CLOCK_T
+#endif /* _OS2 && __IBMC__ */
 
 #ifndef _MODE_T
 #define _MODE_T