Updated for new main/ConverseInit structure.
authorJosh Yelon <jyelon@uiuc.edu>
Thu, 13 Feb 1997 09:31:35 +0000 (09:31 +0000)
committerJosh Yelon <jyelon@uiuc.edu>
Thu, 13 Feb 1997 09:31:35 +0000 (09:31 +0000)
33 files changed:
src/arch/cm5/conv-mach.h
src/arch/cm5/machine.c
src/arch/exemplar/conv-mach.h
src/arch/ncube2/conv-mach.h
src/arch/ncube2/machine.c
src/arch/net-aix-ppc/conv-mach.h
src/arch/net-hp-cc/conv-mach.h
src/arch/net-hp/conv-mach.h
src/arch/net-irix/conv-mach.h
src/arch/net-sol-cc/conv-mach.h
src/arch/net-sol-smp/conv-mach.h
src/arch/net-sol/conv-mach.h
src/arch/net-sun/conv-mach.h
src/arch/paragon-osf/conv-mach.h
src/arch/paragon-sunmos/conv-mach.h
src/arch/paragon/machine.c
src/arch/sim-hp/conv-mach.h
src/arch/sim-rs6k/conv-mach.h
src/arch/sim-sol/conv-mach.h
src/arch/sim-sun/conv-mach.h
src/arch/sp1/conv-mach.h
src/arch/sp1/machine.c
src/arch/t3d/conv-mach.h
src/arch/t3d/machine.c
src/arch/tcp-hp/conv-mach.h
src/arch/tcp-sol/conv-mach.h
src/arch/uth-hp-cc/conv-mach.h
src/arch/uth-hp/conv-mach.h
src/arch/uth-rs6k/conv-mach.h
src/arch/uth-sol-cc/conv-mach.h
src/arch/uth-sol/conv-mach.h
src/arch/uth-sun/conv-mach.h
src/arch/uth/machine.c

index 685e1b9ab8607160c4b1c12dcb2ed3449339c617..2c0f25d73dede1cfdcb72011fc7f00b7463bbfb6 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.27  1997-02-08 14:10:10  jyelon
+ * Revision 2.28  1997-02-13 09:31:40  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.27  1997/02/08 14:10:10  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.26  1997/02/06 20:20:21  jyelon
@@ -68,9 +71,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
-#define CMK_SIGNAL_NOT_NEEDED                              0
+#define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
index 6c064b3bf74d6fd47c69a4e4849454401fac6326..a589c8983e2fd261252050af308a68e7221164dc 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.12  1996-07-15 20:59:22  jyelon
+ * Revision 2.13  1997-02-13 09:31:40  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.12  1996/07/15 20:59:22  jyelon
  * Moved much timer, signal, etc code into common.
  *
  * Revision 2.11  1996/04/18 22:40:35  sanjeev
@@ -452,70 +455,72 @@ int node, neighbour;
 
 /************************** MAIN ***********************************/
 
-main(argc, argv)
+void ConverseExit()
+{}
+
+void ConverseStart(argc, argv, fn)
 int argc;
 char **argv;
+CmiStartFn fn;
 {
-       int n, i, j ;
-
-        CMMD_fset_io_mode(stdin, CMMD_independent) ;
-       CMMD_fset_io_mode(stdout, CMMD_independent) ;
-       CMMD_fset_io_mode(stderr, CMMD_independent) ;
-
-        fcntl(fileno(stdout), F_SETFL, O_APPEND) ;
-        fcntl(fileno(stderr), F_SETFL, O_APPEND) ;
-
-       CpvAccess(Cmi_mype) = CMMD_self_address() ;
-
-        CpvAccess(Cmi_numpes) = numpes = CMMD_partition_size() ;
-
-       if ( argc >= 2 ) { /* Check if theres a +p #procs */
-               for ( i=1; i<argc; i++ ) {
-                       if ( strncmp(argv[i], "+p", 2) != 0) 
-                               continue ;
-                       if ( strlen(argv[i]) > 2 ) {
-                               CpvAccess(Cmi_numpes) = numpes = atoi(&(argv[i][2])) ;
-                               for ( j=i; j<argc-1; j++ )
-                                       argv[j] = argv[j+1] ;
-                               argc-- ;
-                       }
-                       else {
-                               CpvAccess(Cmi_numpes) = numpes = atoi(argv[i+1]) ;
-                               for ( j=i; j<argc-2; j++ )
-                                       argv[j] = argv[j+2] ;
-                               argc -= 2 ;
-                       }
-                       break ;
-               }
-       }
-
-       if ( CpvAccess(Cmi_mype) >= CpvAccess(Cmi_numpes) )
-               exit(0) ;
-
-       /* find dim = log2(numpes), to pretend we are a hypercube */
-       for ( Cmi_dim=0,n=numpes-1; n>=1; n/=2 )
-               Cmi_dim++ ;
-
-       /* Initialize timers */
-       CmiTimerInit();
-       user_main(argc, argv);
+  int n, i, j ;
+  
+  CMMD_fset_io_mode(stdin, CMMD_independent) ;
+  CMMD_fset_io_mode(stdout, CMMD_independent) ;
+  CMMD_fset_io_mode(stderr, CMMD_independent) ;
+  
+  fcntl(fileno(stdout), F_SETFL, O_APPEND) ;
+  fcntl(fileno(stderr), F_SETFL, O_APPEND) ;
+  
+  CpvAccess(Cmi_mype) = CMMD_self_address() ;
+  
+  CpvAccess(Cmi_numpes) = numpes = CMMD_partition_size() ;
+  
+  if ( argc >= 2 ) { /* Check if theres a +p #procs */
+    for ( i=1; i<argc; i++ ) {
+      if ( strncmp(argv[i], "+p", 2) != 0) 
+       continue ;
+      if ( strlen(argv[i]) > 2 ) {
+       CpvAccess(Cmi_numpes) = numpes = atoi(&(argv[i][2])) ;
+       for ( j=i; j<argc-1; j++ )
+         argv[j] = argv[j+1] ;
+       argc-- ;
+      }
+      else {
+       CpvAccess(Cmi_numpes) = numpes = atoi(argv[i+1]) ;
+       for ( j=i; j<argc-2; j++ )
+         argv[j] = argv[j+2] ;
+       argc -= 2 ;
+      }
+      break ;
+    }
+  }
+  
+  if (CpvAccess(Cmi_mype) >= CpvAccess(Cmi_numpes))
+    exit(0) ;
+  CmiSpanTreeInit(); 
+  CpvAccess(CmiLocalQueue) = FIFO_Create() ;
+  
+  /* find dim = log2(numpes), to pretend we are a hypercube */
+  for ( Cmi_dim=0,n=numpes-1; n>=1; n/=2 )
+    Cmi_dim++ ;
+  
+  /* Initialize timers */
+  CmiTimerInit();
+  ConverseCommonInit(argv);
+  CthInit(argv);
 }
 
-
-
-void CmiInitMc(argv)
-char *argv[];
+void ConverseInit(argc, argv, fn)
+int argc;
+char **argv;
+CmiStartFn fn;
 {
-       CmiSpanTreeInit(); 
-       CpvAccess(CmiLocalQueue) = FIFO_Create() ;
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
 }
 
 
-void CmiExit()
-{}
-
-
 /*****************************************************************************
  *
  * CmiAlloc, CmiSize, and CmiFree
index 21e2f5235270ad2ebd14716fdebc32c42ca65194..8e504f817f7405076c097adcbf536acc0e1642cd 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.26  1997-02-08 14:10:16  jyelon
+ * Revision 2.27  1997-02-13 09:31:41  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.26  1997/02/08 14:10:16  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.25  1997/02/06 20:20:29  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index d2ae95c32a50c8476766ad20148d20cba119368a..d0d2ce552a21fb57f3d3b8f37ee4bec995d3a88c 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.26  1997-02-08 14:10:16  jyelon
+ * Revision 2.27  1997-02-13 09:31:42  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.26  1997/02/08 14:10:16  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.25  1997/02/06 20:20:33  jyelon
@@ -64,9 +67,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 6afc2e7fed3729a3fb93179746083de308a3bb9e..1ad2502be2998451ee0a70920bda7d319fb7d779 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.13  1996-07-15 20:59:22  jyelon
+ * Revision 2.14  1997-02-13 09:31:43  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.13  1996/07/15 20:59:22  jyelon
  * Moved much timer, signal, etc code into common.
  *
  * Revision 2.12  1995/11/13 22:51:32  gursoy
@@ -329,36 +332,36 @@ int node, neighbour;
 
 /************************** SETUP ***********************************/
 
-void CmiInitMc(argv)
+void ConverseExit()
+{}
+
+void ConverseStart(argc, argv, fn)
+int argc;
 char *argv[];
+CmiStartFn fn;
 {
-    CpvInitialize(int, Cmi_mype);
-    CpvInitialize(int, Cmi_numpes);
-    CpvInitialize(void*, CmiLocalQueue);
-
-    whoami(&CpvAccess(Cmi_mype), &process, &host, &Cmi_dim);
-    CpvAccess(Cmi_numpes) = (1 << Cmi_dim) ;
-
-
-    CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
-    CmiSpanTreeInit();
-    CmiTimerInit();
+  CpvInitialize(int, Cmi_mype);
+  CpvInitialize(int, Cmi_numpes);
+  CpvInitialize(void*, CmiLocalQueue);
+  whoami(&CpvAccess(Cmi_mype), &process, &host, &Cmi_dim);
+  CpvAccess(Cmi_numpes) = (1 << Cmi_dim) ;
+  CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
+  CmiSpanTreeInit();
+  CmiTimerInit();
+  ConverseCommonInit(argv);
+  CthInit(argv);
 }
 
-
-
-void CmiExit()
-{}
-
-
-void CmiDeclareArgs()
-{}
-
-
-main(argc,argv)
+void ConverseInit(argc, argv, fn)
 int argc;
 char *argv[];
+CmiStartFn fn;
 {
-    user_main(argc,argv);
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
 }
 
+void CmiDeclareArgs()
+{}
+
+
index abf18e955681b9e76c12235b01aa4afe2c8f71ea..42cfdc81c78cc7df5a7bb3485bc2a9c8263a8d46 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.27  1997-02-08 14:10:20  jyelon
+ * Revision 1.28  1997-02-13 09:31:45  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.27  1997/02/08 14:10:20  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.26  1997/02/06 20:20:41  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long unsigned int
index 973607b4e4a48360588a0e34bb1d63a5bd91dc8b..b6a6139f29455ae333baca3f18b5721a91c45c29 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.15  1997-02-08 14:10:18  jyelon
+ * Revision 1.16  1997-02-13 09:31:44  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.15  1997/02/08 14:10:18  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.14  1997/02/06 20:20:38  jyelon
@@ -71,9 +74,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 21dda8f134d91ea483912ed28de093d0ca40f9ae..fd882b5f9397bcc7d6414dcd9ecd6805737495c1 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.31  1997-02-08 14:10:17  jyelon
+ * Revision 2.32  1997-02-13 09:31:43  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.31  1997/02/08 14:10:17  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.30  1997/02/06 20:20:36  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 01b8d90057449b7a4561b6a62987fa3a299a62d6..7d160bff7c685a0dd88dfeb567c5c536bb764940 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.2  1997-02-08 14:10:19  jyelon
+ * Revision 1.3  1997-02-13 09:31:45  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.2  1997/02/08 14:10:19  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.1  1997/01/28 16:26:42  milind
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index e38b1dc1048b928248fb98ae9ea9d6def90d61c9..f7534857a96ddebbb37f52f9de5de2547e055da0 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.7  1997-02-08 14:10:21  jyelon
+ * Revision 1.8  1997-02-13 09:31:47  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.7  1997/02/08 14:10:21  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.6  1997/02/06 20:20:43  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index 8dd3d5010733d03ab231fec7d12582773066416e..5f95a06feed2ea74e18f32ed429b28dc72a96108 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.3  1997-02-08 14:10:22  jyelon
+ * Revision 1.4  1997-02-13 09:31:48  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.3  1997/02/08 14:10:22  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.2  1997/02/06 20:00:03  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index 8f6fcf85075bef5d349072ecf683dc6eaabe4b88..eb65cd1003781df2360ccfa16f20348724e15215 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.31  1997-02-08 14:10:20  jyelon
+ * Revision 2.32  1997-02-13 09:31:46  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.31  1997/02/08 14:10:20  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.30  1997/02/07 02:16:37  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index 7df3b4f058b0ffa086528bac20f1bf336d1e4ca6..4008dad739b94a4cf2e7b27830cc4786b74c1c1b 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.30  1997-02-08 14:10:23  jyelon
+ * Revision 2.31  1997-02-13 09:31:48  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.30  1997/02/08 14:10:23  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.29  1997/02/07 02:16:42  jyelon
@@ -73,9 +76,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long unsigned int
index d869046841eeb0dd8f171343f217ccba2d76e778..1f148a21287ea34d40d2da5eca636b53dcc04982 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.13  1997-02-08 14:10:24  jyelon
+ * Revision 1.14  1997-02-13 09:31:49  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.13  1997/02/08 14:10:24  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.12  1997/02/06 20:20:48  jyelon
@@ -64,9 +67,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index de9280d533aeea8bae19ed604a8b8aff914d0942..0df8e01ee439b5b092db22fc03361b9bb355c1d7 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.13  1997-02-08 14:10:24  jyelon
+ * Revision 1.14  1997-02-13 09:31:50  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.13  1997/02/08 14:10:24  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.12  1997/02/06 20:20:54  jyelon
@@ -64,9 +67,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 125ee2f74ceb2dc6087827ab720d8ae96775a7bb..65055e09ed70d1b02136a76858bb5810ee9f7a01 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.2  1996-07-15 20:59:22  jyelon
+ * Revision 1.3  1997-02-13 09:31:35  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.2  1996/07/15 20:59:22  jyelon
  * Moved much timer, signal, etc code into common.
  *
  * Revision 1.1  1995/11/15 18:17:30  gursoy
@@ -319,35 +322,36 @@ char * msg;
 
 /************************** SETUP ***********************************/
 
-void CmiInitMc(argv)
-char *argv[];
+void ConverseExit()
 {
-    CpvInitialize(int, Cmi_mype);
-    CpvInitialize(int, Cmi_numpes);
-    CpvInitialize(void*, CmiLocalQueue);
-
-
-    CpvAccess(Cmi_mype)  = mynode();
-    CpvAccess(Cmi_numpes) = numnodes();
-    neighbour_init(CpvAccess(Cmi_mype));
-    CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
-    CmiSpanTreeInit();
-    CmiTimerInit();
 }
 
-
-
-void CmiExit()
-{}
-
-
-main(argc,argv)
-int   argc;
-char  *argv[];
+void ConverseStart(argc, argv, fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
 {
-user_main(argc,argv);    
+  CpvInitialize(int, Cmi_mype);
+  CpvInitialize(int, Cmi_numpes);
+  CpvInitialize(void*, CmiLocalQueue);
+  CpvAccess(Cmi_mype)  = mynode();
+  CpvAccess(Cmi_numpes) = numnodes();
+  neighbour_init(CpvAccess(Cmi_mype));
+  CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
+  CmiSpanTreeInit();
+  CmiTimerInit();
+  ConverseCommonInit(argv);
+  CthInit(argv);
 }
 
+void ConverseInit(argc, argv, fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
+{
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
+}
 
 
 /**********************  LOAD BALANCER NEEDS **********************/
index 9fef45b80af0c902c2ac7a18d8437e3f142a1cfe..46f0aff91ab0e7f61b77bcb440a9028e3a0ccfc1 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.18  1997-02-08 14:10:25  jyelon
+ * Revision 1.19  1997-02-13 09:31:50  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.18  1997/02/08 14:10:25  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.17  1997/02/06 20:20:56  jyelon
@@ -70,9 +73,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 1
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               0
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  0
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               1
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 4accf613c5611b7a98668b1133d74050217c7b0b..14ec663932b252b82d8caf1a117df67aa4e97dc2 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.17  1997-02-08 14:10:26  jyelon
+ * Revision 1.18  1997-02-13 09:31:51  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.17  1997/02/08 14:10:26  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.16  1997/02/06 20:20:58  jyelon
@@ -70,9 +73,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 1
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               0
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  0
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               1
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long unsigned int
index f98f728a0649fc07a6e70a01a31bba55e537a4ee..b826befd9d52b6912e928843657127d0d1616e74 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.16  1997-02-08 14:10:26  jyelon
+ * Revision 1.17  1997-02-13 09:31:54  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.16  1997/02/08 14:10:26  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.15  1997/02/06 20:21:00  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 1
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               0
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  0
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               1
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index 841a2c994ff4a5d28da4cf2ea2178a07b03a8d62..e3b9f0578a0d31f075ccfe39cf55b576e4b673f9 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.16  1997-02-08 14:10:27  jyelon
+ * Revision 1.17  1997-02-13 09:31:54  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.16  1997/02/08 14:10:27  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.15  1997/02/06 20:21:02  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 1
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               0
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  0
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               1
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long
index a7ac110dcc965c5a5cb512afd4c5792dd2775882..7a57d97311a5eed0e89ca0ed3470e8070a6a4749 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.25  1997-02-08 14:10:28  jyelon
+ * Revision 2.26  1997-02-13 09:31:55  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.25  1997/02/08 14:10:28  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.24  1997/02/06 20:21:04  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 8f33614d5ae30c3dfba2877ee4f2ca169e20ee7e..9810d71204d104e897cf66c1754c8b296d6a66c2 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.10  1997-02-02 07:33:56  milind
+ * Revision 2.11  1997-02-13 09:31:56  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.10  1997/02/02 07:33:56  milind
  * Fixed Bugs in SP1 machine dependent code that made megacon to hang.
  * Consisted of almost 60 percent rewrite.
  *
@@ -417,50 +420,50 @@ int CmiFlushPrintfs()
 
 /************************** MAIN ***********************************/
 
-void CmiInitMc(argv)
-char *argv[];
-{
-     CpvAccess(CmiLocalQueue) = FIFO_Create();
-
-     CmiSpanTreeInit();
-     CmiTimerInit();
-     
-}
+void CmiDeclareArgs()
+{}
 
-void CmiExit()
+void ConverseExit()
 {
   int msgid = allmsg, nbytes;
   mpc_wait(&msgid, &nbytes);
 }
 
-
-void CmiDeclareArgs()
-{}
-
-
-main(argc, argv)
+ConverseStart(argc, argv, fn)
 int argc;
 char *argv[];
+CmiStartFn fn;
 {
-       int n ;
-   int nbuf[4];
-
-
-       Cmi_myrank = 0;
-       mpc_environ(&Cmi_numpes, &Cmi_mype);
-       numpes = Cmi_numpes;
-   mpc_task_query(nbuf, 4, 3);
-   dontcare = nbuf[0];
-   allmsg = nbuf[1];
-   mpc_task_query(nbuf, 2, 2);
-   msgtype = nbuf[0];
-
-       /* find dim = log2(numpes), to pretend we are a hypercube */
-       for ( Cmi_dim=0,n=numpes; n>1; n/=2 )
-               Cmi_dim++ ;
+  int n ;
+  int nbuf[4];
+  
+  Cmi_myrank = 0;
+  mpc_environ(&Cmi_numpes, &Cmi_mype);
+  numpes = Cmi_numpes;
+  mpc_task_query(nbuf, 4, 3);
+  dontcare = nbuf[0];
+  allmsg = nbuf[1];
+  mpc_task_query(nbuf, 2, 2);
+  msgtype = nbuf[0];
+  
+  /* find dim = log2(numpes), to pretend we are a hypercube */
+  for ( Cmi_dim=0,n=numpes; n>1; n/=2 )
+    Cmi_dim++ ;
+  CmiSpanTreeInit();
+  CmiTimerInit();
+  CpvInitialize(void *, CmiLocalQueue);
+  CpvAccess(CmiLocalQueue) = FIFO_Create();
+  ConverseCommonInit(argv);
+  CthInit(argv);
+}
 
-       user_main(argc, argv);
-/*     exit(0); */
+void ConverseInit(argc, argv, fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
+{
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
 }
 
 /*****************************************************************************
index eff1b1e6f237125c17a711adcd79b18691c79a94..9537f080369a4b5cfd48b226c813452f51aa9a89 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.14  1997-02-08 14:10:29  jyelon
+ * Revision 1.15  1997-02-13 09:31:56  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.14  1997/02/08 14:10:29  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.13  1997/02/06 20:21:10  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             1
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 1e4418806d990f04a3ae2bbcce26c352ddeefc99..a9a4adbf8cbfd9880a3723a5c24acf173d817a46 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.4  1996-07-16 21:08:30  gursoy
+ * Revision 1.5  1997-02-13 09:31:57  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.4  1996/07/16 21:08:30  gursoy
  * added empty CmiDeliverSpecificMsg
  *
  * Revision 1.3  1996/07/15  20:59:22  jyelon
@@ -351,45 +354,41 @@ char * msg;
 
 /************************** SETUP ***********************************/
 
-void CmiInitMc(argv)
-char *argv[];
+void ConverseExit()
 {
-    CpvInitialize(int, Cmi_mype);
-    CpvInitialize(int, Cmi_numpes);
-    CpvInitialize(void*, CmiLocalQueue);
-
-
-    CpvAccess(Cmi_mype)  = _my_pe();
-    CpvAccess(Cmi_numpes) = _num_pes();
-    neighbour_init(CpvAccess(Cmi_mype));
-    CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
-    CmiSpanTreeInit();
-
-    FM_set_parameter(MAX_MSG_SIZE_FINC, MAX_PACKET_SIZE) ;
-
-    /* 512 is the default value used by FM */
-    FM_set_parameter(MSG_BUFFER_SIZE_FINC, 512);
-
-    FM_initialize() ;
-
-    CmiTimerInit();
 }
 
-
-
-void CmiExit()
-{}
-
-
-main(argc,argv)
-int   argc;
-char  *argv[];
+void ConverseStart(argc, argv, fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
+{
+  CpvInitialize(int, Cmi_mype);
+  CpvInitialize(int, Cmi_numpes);
+  CpvInitialize(void*, CmiLocalQueue);
+  CpvAccess(Cmi_mype)  = _my_pe();
+  CpvAccess(Cmi_numpes) = _num_pes();
+  CpvAccess(CmiLocalQueue)= (void *) FIFO_Create();
+  ConverseCommonSetup(argv);
+  CthInit(argv);
+  neighbour_init(CpvAccess(Cmi_mype));
+  CmiSpanTreeInit();
+  FM_set_parameter(MAX_MSG_SIZE_FINC, MAX_PACKET_SIZE) ;
+  /* 512 is the default value used by FM */
+  FM_set_parameter(MSG_BUFFER_SIZE_FINC, 512);
+  FM_initialize() ;
+  CmiTimerInit();
+}
+
+void ConverseInit(argc, argv, fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
 {
-user_main(argc,argv);    
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
 }
 
-
-
 /**********************  LOAD BALANCER NEEDS **********************/
 
 
index 72651daa357b3d607c7bf13827f08419f9c461a3..0d8927cb2843d3ff88139e7eb3ab9134f21b91ef 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.32  1997-02-08 14:10:29  jyelon
+ * Revision 2.33  1997-02-13 09:31:58  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.32  1997/02/08 14:10:29  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.31  1997/02/06 20:21:11  jyelon
@@ -70,9 +73,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index d89148ff1dbfb7d858be7251fae365a8f63ec583..88ff05f1ac1cdbb94f24fb2f2980fe10c52385ed 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 2.31  1997-02-08 14:10:30  jyelon
+ * Revision 2.32  1997-02-13 09:31:59  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 2.31  1997/02/08 14:10:30  jyelon
  * Correcting bugs in network version.
  *
  * Revision 2.30  1997/02/06 20:21:11  jyelon
@@ -64,9 +67,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     1
-#define CMK_CTHINIT_IS_IN_MAIN                             0
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
index 7f144b2dea9f23074ce280509b199c39c18cfa1d..6c19b96c2b4a7a6154fa37ca4ea4c5865aacb45a 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.6  1997-02-08 14:10:31  jyelon
+ * Revision 1.7  1997-02-13 09:32:00  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.6  1997/02/08 14:10:31  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.5  1997/02/06 20:21:13  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index a799790bba85708ac5326a124eedd2aa6caa5982..80f68900df04af7d661e59cb1746469aa19774d3 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.20  1997-02-08 14:10:31  jyelon
+ * Revision 1.21  1997-02-13 09:32:00  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.20  1997/02/08 14:10:31  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.19  1997/02/06 20:21:12  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              0
 #define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index e4b09693b07ffa7eaed99c1e912281006d5eca9b..8ebd76e0160df0b682ba4528ef5d16974839a2dd 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.22  1997-02-08 14:10:32  jyelon
+ * Revision 1.23  1997-02-13 09:32:01  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.22  1997/02/08 14:10:32  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.21  1997/02/06 20:21:14  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long unsigned int
index f64f673f993e26e27a0c68d1e267f41d3c069ad0..3d12173a177cbf727d1f802e70132f233509467e 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.7  1997-02-08 14:10:34  jyelon
+ * Revision 1.8  1997-02-13 09:32:03  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.7  1997/02/08 14:10:34  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.6  1997/02/06 20:21:15  jyelon
@@ -67,9 +70,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 5021d0eefa970464fb095165e1d661808ec03179..44c6fcd740b0733bec28fc316a568be03fa54daa 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.22  1997-02-08 14:10:33  jyelon
+ * Revision 1.23  1997-02-13 09:32:02  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.22  1997/02/08 14:10:33  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.21  1997/02/06 20:21:15  jyelon
@@ -64,9 +67,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            0
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            0
 #define CMK_SIGNAL_NOT_NEEDED                              1
 #define CMK_SIGNAL_USE_SIGACTION                           0
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
index 2bb3a4caf4ec1796aaada4d59287003e1b741fdf..1c87fffc550729356b3ef33fbf04f069f6e7a3e6 100644 (file)
@@ -8,7 +8,10 @@
  ***************************************************************************
  *
  * $Log$
- * Revision 1.23  1997-02-08 14:10:35  jyelon
+ * Revision 1.24  1997-02-13 09:32:03  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.23  1997/02/08 14:10:35  jyelon
  * Correcting bugs in network version.
  *
  * Revision 1.22  1997/02/06 20:21:16  jyelon
@@ -70,9 +73,6 @@
 #define CMK_CSDEXITSCHEDULER_IS_A_FUNCTION                 0
 #define CMK_CSDEXITSCHEDULER_SET_CSDSTOPFLAG               1
 
-#define CMK_CTHINIT_IS_IN_CONVERSEINIT                     0
-#define CMK_CTHINIT_IS_IN_MAIN                             1
-
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_DEFAULT_MAIN_USES_SIMULATOR_CODE               0
 
 #define CMK_SIGHOLD_NOT_NEEDED                             0
 #define CMK_SIGHOLD_USE_SIGMASK                            1
 
-#define CMK_SIGNAL_IS_A_BUILTIN                            1
 #define CMK_SIGNAL_NOT_NEEDED                              0
-#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION                           1
 #define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              0
 
 #define CMK_SIZE_T                                         long unsigned int
index c38397fdf31b438ccba11505e97d876228712cd0..20d649200ba41e256e2896ed224cd3cf3906b5b4 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.19  1997-01-17 15:49:57  jyelon
+ * Revision 1.20  1997-02-13 09:31:39  jyelon
+ * Updated for new main/ConverseInit structure.
+ *
+ * Revision 1.19  1997/01/17 15:49:57  jyelon
  * Minor adjustments to deal with recent changes to Common code.
  *
  * Revision 1.18  1996/11/20 06:46:54  jyelon
@@ -167,6 +170,7 @@ int        Cmi_numpes;
 int        Cmi_nodesize;
 int        Cmi_stacksize = 64000;
 char     **CmiArgv;
+CmiStartFn CmiStart;
 CthThread *CmiThreads;
 Fifo      *CmiQueues;
 int       *CmiBarred;
@@ -494,25 +498,6 @@ char * msg;
 
 /************************** SETUP ***********************************/
 
-void CmiInitMc(argv)
-char *argv[];
-{
-  CpvAccess(CmiLocalQueue) = CmiQueues[CmiMyPe()];
-  CmiSpanTreeInit();
-  CmiTimerInit();
-}
-
-void CmiCallMain()
-{
-  int argc; char **argv;
-  for (argc=0; CmiArgv[argc]; argc++);
-  argv = (char **)CmiAlloc((argc+1)*sizeof(char *));
-  memcpy(argv, CmiArgv, (argc+1)*sizeof(char *));
-  user_main(argc, argv);
-  CmiThreads[CmiMyPe()] = 0;
-  CmiNext();
-}
-
 static void CmiParseArgs(argv)
 char **argv;
 {
@@ -537,22 +522,49 @@ char **argv;
   }
 }
 
-main(argc,argv)
+void CmiInitPE()
+{
+  CpvAccess(CmiLocalQueue) = CmiQueues[CmiMyPe()];
+  CmiSpanTreeInit();
+  CmiTimerInit();
+  ConverseCommonInit(CmiArgv);
+}
+
+void CmiCallMain()
+{
+  int argc; char **argv;
+  for (argc=0; CmiArgv[argc]; argc++);
+  argv = (char **)CmiAlloc((argc+1)*sizeof(char *));
+  memcpy(argv, CmiArgv, (argc+1)*sizeof(char *));
+  CmiInitPE();
+  CmiStart(argc, argv);
+  CmiThreads[CmiMyPe()] = 0;
+  CmiNext();
+}
+
+void ConverseExit()
+{
+  CmiThreads[CmiMyPe()] = 0;
+  CmiNext();
+}
+
+void ConverseStart(argc,argv,fn)
 int argc;
 char *argv[];
+CmiStartFn fn;
 {
-  CthThread t; Fifo q; int stacksize, i;
-
+  CthThread t; int stacksize, i;
+  
 #if CMK_USE_HP_MAIN_FIX
 #if FOR_CPLUS
   _main(argc,argv);
 #endif
 #endif
+  
   CmiArgv = argv;
+  CmiStart = fn;
   CmiParseArgs(argv);
-  
   CthInit(argv);
-  
   CpvInitialize(void*, CmiLocalQueue);
   CmiThreads = (CthThread *)CmiAlloc(CmiNumPes()*sizeof(CthThread));
   CmiBarred  = (int       *)CmiAlloc(CmiNumPes()*sizeof(int));
@@ -566,6 +578,14 @@ char *argv[];
     CmiQueues[i] = FIFO_Create();
   }
   Cmi_mype = 0;
-  CmiCallMain();
+  CmiInitPE();
 }
 
+void ConverseInit(argc,argv,fn)
+int argc;
+char *argv[];
+CmiStartFn fn;
+{
+  ConverseStart(argc, argv, fn);
+  fn(argc, argv);
+}