Changed CmiAlloc interrupt-safe for HP machines.
authorMilind Bhandarkar <milind@cs.uiuc.edu>
Wed, 15 Jan 1997 16:17:48 +0000 (16:17 +0000)
committerMilind Bhandarkar <milind@cs.uiuc.edu>
Wed, 15 Jan 1997 16:17:48 +0000 (16:17 +0000)
src/arch/net-hp-cc/conv-mach.h
src/arch/net/machine.c

index b65db05b6fd712bd18f7057548a95e159fbfabba..0bc1f6af16687371fb6cbc286e662f581ed55b75 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.11  1996-11-23 02:25:38  milind
+ * Revision 1.12  1997-01-15 16:17:48  milind
+ * Changed CmiAlloc interrupt-safe for HP machines.
+ *
+ * Revision 1.11  1996/11/23 02:25:38  milind
  * Fixed several subtle bugs in the converse runtime for convex
  * exemplar.
  *
@@ -81,8 +84,8 @@
 #define CMK_MACHINE_NAME                                   "net-hp-cc"
 
 #define CMK_MALLOC_USE_GNU                                 0
-#define CMK_MALLOC_USE_GNU_WITH_INTERRUPT_SUPPORT          1
-#define CMK_MALLOC_USE_OS_BUILTIN                          0
+#define CMK_MALLOC_USE_GNU_WITH_INTERRUPT_SUPPORT          0
+#define CMK_MALLOC_USE_OS_BUILTIN                          1
 
 #define CMK_MSG_HEADER_SIZE_BYTES                          4
 
index ecc6a5f7e6a2d49b7d062bd6528f9b6eb05d5eec..ee9edf4fb7c39e6a95dd01f91a38bff68a448795 100644 (file)
@@ -311,8 +311,10 @@ int size;
 {
   cmi_state cs = CmiState();
   char *res;
+  CmiInterruptsBlock();
   cs->NumAlloc++;
   res =(char *)malloc(size+8);
+  CmiInterruptsRelease();
   if (res==0) KillEveryone("Memory allocation failed.");
   ((int *)res)[0]=size;
   return (void *)(res+8);
@@ -328,8 +330,10 @@ void CmiFree(blk)
 void *blk;
 {
   cmi_state cs = CmiState();
+  CmiInterruptsBlock();
   cs->NumFree++;
   free(((char *)blk)-8);
+  CmiInterruptsRelease();
 }
 
 /*****************************************************************************