Fixed CthInitialize bug on uth machines.
authorMilind Bhandarkar <milind@cs.uiuc.edu>
Wed, 29 Oct 1997 23:52:42 +0000 (23:52 +0000)
committerMilind Bhandarkar <milind@cs.uiuc.edu>
Wed, 29 Oct 1997 23:52:42 +0000 (23:52 +0000)
32 files changed:
src/arch/origin2000/conv-mach.csh
src/arch/origin2000/machine.c
src/arch/origin2000/spantree.c
src/ck-core/acc.c
src/ck-core/boc.c
src/ck-core/common.c
src/ck-core/condsend.c
src/ck-core/env_macros.h
src/ck-core/init.c
src/ck-core/memstuff.c
src/ck-core/mono.c
src/ck-core/qd.c
src/ck-core/rdonly.c
src/ck-core/register.c
src/ck-core/stat.c
src/ck-core/tbl.c
src/ck-core/vid.c
src/ck-core/wrtone.c
src/ck-ldb/ldbcfns.c
src/ck-perf/trace-none.c
src/ck-perf/trace-projections.c
src/ck-perf/trace-summary.c
src/ck-perf/traceio.c
src/conv-core/convcore.c
src/conv-core/cpm.c
src/conv-core/cpthreads.c
src/conv-core/fifo.c
src/conv-core/futures.c
src/conv-core/gnumalloc.c
src/conv-core/queueing.c
src/conv-core/threads.c
src/xlat/xl-main.c

index 78296d75853a5a0eec7e5532a3551c58eb474143..7b840a2120f7189cb5310e3598a1d79af374c585 100755 (executable)
@@ -18,18 +18,18 @@ set CMK_CPP_CHARM='/usr/lib/cpp '
 set CMK_CPP_C='cc -E -64 '
 set CMK_LDRO='ld -r -o'
 set CMK_LDRO_WORKS=0
-set CMK_CC='cc  -w -64 '
-set CMK_CC_RELIABLE='cc  -w -64 '
-set CMK_CC_FASTEST='cc  -w -64 '
-set CMK_CXX='CC -w -64 '
-set CMK_CXXPP='CC -E -w -64 '
+set CMK_CC='cc  -64 '
+set CMK_CC_RELIABLE='cc  -64 '
+set CMK_CC_FASTEST='cc  -64 '
+set CMK_CXX='CC -64 '
+set CMK_CXXPP='CC -E -64 '
 set CMK_CF77=''
 set CMK_C_DEBUG='-g'
 set CMK_C_OPTIMIZE='-O'
 set CMK_CXX_DEBUG='-g'
 set CMK_CXX_OPTIMIZE='-O'
-set CMK_LD='cc -w -64 '
-set CMK_LDXX='CC -w -64 '
+set CMK_LD='cc -64 '
+set CMK_LDXX='CC -64 '
 set CMK_LD77=''
 set CMK_M4='m4'
 set CMK_SUF='o'
@@ -37,10 +37,10 @@ set CMK_AR='ar cq'
 set CMK_RANLIB='true'
 set CMK_LIBS=' -lqt '
 set CMK_SEQ_LIBS=' '
-set CMK_SEQ_CC='cc -w -64 '
-set CMK_SEQ_LD='cc -w -64 '
-set CMK_SEQ_CXX='CC -w -64 '
-set CMK_SEQ_LDXX='CC -w -64 '
+set CMK_SEQ_CC='cc -64 '
+set CMK_SEQ_LD='cc -64 '
+set CMK_SEQ_CXX='CC -64 '
+set CMK_SEQ_LDXX='CC -64 '
 set CMK_NM='nm'
 set CMK_NM_FILTER="grep '|GLOB |' | sed -e 's/.*|//'"
 set CMK_CPP_SUFFIX="i"
index 8fa4776525a392ee13af1e95c8da41aede9069e5..fae6a18f52dc81259e02fa6b2a6a2ce8068a2ce7 100644 (file)
@@ -168,6 +168,8 @@ void ConverseInit(int argc, char **argv, CmiStartFn fn, int usched, int initret)
     wait(0);
 }
 
+static void neighbour_init(int);
+
 static void threadInit(void *arg)
 {
   USER_PARAMETERS *usrparam;
@@ -204,7 +206,7 @@ void ConverseExit(void)
 }
 
 
-CmiDeclareArgs()
+void CmiDeclareArgs(void)
 {
 }
 
@@ -324,7 +326,7 @@ long CmiNumNeighbours(int node)
 }
 
 
-CmiGetNodeNeighbours(int node, int *neighbours)
+void CmiGetNodeNeighbours(int node, int *neighbours)
 {
   int i;
 
@@ -344,7 +346,7 @@ int CmiNeighboursIndex(int node, int neighbour)
 }
 
 
-static neighbour_init(int p)
+static void neighbour_init(int p)
 {
   int a,b,n;
 
index 69bd68c42eab034971b3120b40bc85aba278593b..1d9191c4f6257c550ee02c59bc11ba15652efd51 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.1  1997-03-28 17:38:25  milind
+ * Revision 1.2  1997-10-29 23:53:14  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 1.1  1997/03/28 17:38:25  milind
  * Added Origin2000 version.
  *
  * Revision 2.6  1995/10/27 21:45:35  jyelon
@@ -46,7 +49,7 @@ static char ident[] = "@(#)$Header$";
 #define MAXSPAN    4          /* The maximum permitted span on 
                                 each node of the spanning tree */
 
-CmiSpanTreeInit()
+void CmiSpanTreeInit(void)
 {
 }
 
@@ -86,7 +89,7 @@ int node;
     else return ((CmiNumPes() - 1) - node * MAXSPAN);
 }
 
-CmiSendToSpanTreeLeaves(size, msg)
+void CmiSendToSpanTreeLeaves(size, msg)
 int size;
 char * msg;
 {
index 1478dca5626cc0b2534bd38d32552c9dd3ba66c8..05a2333380b00734df73203076728b00339c82d6 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.5  1995-10-13 18:15:53  jyelon
+ * Revision 2.6  1997-10-29 23:52:42  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.5  1995/10/13 18:15:53  jyelon
  * K&R changes.
  *
  * Revision 2.4  1995/09/01  02:13:17  jyelon
@@ -51,13 +54,13 @@ extern void CPlus_SetAccId() ;
 
 
 /* internal functions */
-static ACC_CollectFromNode_Fn();
-static ACC_LeafNodeCollect_Fn();
-static ACC_InteriorNodeCollect_Fn();
-static ACC_BranchInit_Fn();
+static void ACC_CollectFromNode_Fn();
+static void ACC_LeafNodeCollect_Fn();
+static void ACC_InteriorNodeCollect_Fn();
+static void ACC_BranchInit_Fn();
 
 
-AccAddSysBocEps()
+void AccAddSysBocEps(void)
 {
   CsvAccess(CkChare_ACC) =
     registerChare("CkChare_ACC", sizeof(ACC_DATA), NULL);
@@ -84,7 +87,7 @@ AccAddSysBocEps()
 
 
 
-CollectValue(bocnum, EP, CID)
+void CollectValue(bocnum, EP, CID)
 int bocnum;
 int EP;
 ChareIDType *CID;
@@ -102,7 +105,7 @@ ChareIDType *CID;
 }
 
 
-static ACC_CollectFromNode_Fn(msg, mydata)
+static void ACC_CollectFromNode_Fn(msg, mydata)
 ACC_COLLECT_MSG *msg;
 ACC_DATA *mydata;
 {
@@ -126,7 +129,7 @@ ACC_DATA *mydata;
 
 
 
-static ACC_LeafNodeCollect_Fn(msg, mydata)
+static void ACC_LeafNodeCollect_Fn(msg, mydata)
 DummyMsg *msg;
 ACC_DATA *mydata;
 {
@@ -151,7 +154,7 @@ TRACE(CmiPrintf("[%d] ACC_NodeCollect : Sent message to parent\n",
 
 
 
-static ACC_InteriorNodeCollect_Fn(msg, mydata)
+static void ACC_InteriorNodeCollect_Fn(msg, mydata)
 char *msg;
 ACC_DATA *mydata;
 {
@@ -198,7 +201,7 @@ TRACE(CmiPrintf("[%d] CreateAcc: boc = %d\n", CmiMyPe(), (AccIDType ) boc));
 }
 
 
-static ACC_BranchInit_Fn(msg, mydata)
+static void ACC_BranchInit_Fn(msg, mydata)
 void *msg;
 ACC_DATA *mydata; 
 {
index 4a88643d1d2b08a87fb967f0ab69fdfc39592048..b5f4e1167636ab5d886fae10e269f8149b405bd4 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.13  1997-07-18 21:21:02  milind
+ * Revision 2.14  1997-10-29 23:52:43  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.13  1997/07/18 21:21:02  milind
  * all files of the form perf-*.c have been changed to trace-*.c, with
  * name expansions. For example, perf-proj.c has been changed to
  * trace-projections.c.
@@ -130,8 +133,10 @@ CpvStaticDeclare(BOCID_MESSAGE_COUNT_, BocIDMessageCountTable);
 
 CHARE_BLOCK *CreateChareBlock();
 
+void GeneralSendMsgBranch();
+
 
-void bocModuleInit()
+void bocModuleInit(void)
 {
    CpvInitialize(int, number_dynamic_boc);
    CpvInitialize(MSG_ELEMENT_, DynamicBocMsgList);
@@ -144,12 +149,12 @@ void bocModuleInit()
 
 
 
-InitializeDynamicBocMsgList()
+void InitializeDynamicBocMsgList(void)
 {
        CpvAccess(DynamicBocMsgList) = (MSG_ELEMENT *) NULL;
 }
 
-InitializeBocDataTable()
+void InitializeBocDataTable(void)
 {
        int i;
 
@@ -157,7 +162,7 @@ InitializeBocDataTable()
            CpvAccess(BocDataTable)[i] = (BOCDATA_QUEUE_ELEMENT *) NULL;
 }
 
-InitializeBocIDMessageCountTable()
+void InitializeBocIDMessageCountTable(void)
 {
        int i;
 
@@ -165,7 +170,7 @@ InitializeBocIDMessageCountTable()
            CpvAccess(BocIDMessageCountTable)[i] = (BOCID_MESSAGE_COUNT *) NULL;
 }
 
-GetDynamicBocMsg(ref, msg, ep)
+void GetDynamicBocMsg(ref, msg, ep)
 int ref;
 void **msg;
 ChareNumType *ep;
@@ -224,6 +229,7 @@ TRACE(CmiPrintf("[%d] GetBocBlockPtr: bocNum=%d, index=%d, element=0x%x\n",
        }
        CmiPrintf("[%d] *** ERROR *** Unable to locate BOC %d data ptr.\n",
                CmiMyPe(),  bocNum);
+  return (CHARE_BLOCK *) 0;
 }
 
 
@@ -273,7 +279,7 @@ TRACE(CmiPrintf("[%d] SetDynamicBocMsg: ref=%d, ep=%d\n",
        return (new->ref);
 }
 
-SetBocBlockPtr(bocNum, ptr)
+void SetBocBlockPtr(bocNum, ptr)
 ChareNumType bocNum;
 CHARE_BLOCK *ptr;
 {
@@ -372,9 +378,10 @@ ChareIDType *ReturnID;
       GeneralSendMsgBranch(CsvAccess(CkEp_DBOC_OtherCreateBoc), msg,
                           0, ImmBocMsg, DynamicBocNum);
     }
+    return 0;
 }
 
-OtherCreateBoc(msg, mydata)
+void OtherCreateBoc(msg, mydata)
 DYNAMIC_BOC_REQUEST_MSG *msg;
 char *mydata;
 {
@@ -402,7 +409,7 @@ void *mydata;
         return chare->x.boc_num;
 }
 
-MyBranchID(pChareID, mydata)
+void MyBranchID(pChareID, mydata)
 ChareIDType *pChareID;
 void *mydata;
 {
@@ -410,7 +417,7 @@ void *mydata;
         *pChareID = chare->selfID;
 }
 
-GeneralSendMsgBranch(ep, msg, destPE, type, bocnum)
+void GeneralSendMsgBranch(ep, msg, destPE, type, bocnum)
 EntryPointType ep;
 void *msg;
 PeNumType destPE;
@@ -443,7 +450,7 @@ TRACE(CmiPrintf("[%d] GeneralSend: type=%d, msgType=%d\n",
 
 
 
-GeneralBroadcastMsgBranch(ep, msg, type, bocnum)
+void GeneralBroadcastMsgBranch(ep, msg, type, bocnum)
 EntryPointType ep;
 void *msg;
 MsgTypes type;
@@ -474,7 +481,7 @@ TRACE(CmiPrintf("[%d] GeneralBroadcast: type=%d, msgType=%d\n",
 }
 
 
-RegisterDynamicBocInitMsg(bocnumptr, mydata)
+void RegisterDynamicBocInitMsg(bocnumptr, mydata)
 ChareNumType *bocnumptr;
 void *mydata;
 {
@@ -501,13 +508,13 @@ TRACE(CmiPrintf("[%d] RegisterDynamicBoc: bocnum=%d, bocdata=0x%x\n",
                                        &bocdata->ReturnID);
                }
                else
-                       GeneralSendMsgBranch(CsvAccess(CkEp_DBOC_RegisterDynamicBocInitMsg), msg,
+                       GeneralSendMsgBranch(CsvAccess(CkEp_DBOC_RegisterDynamicBocInitMsg), (void *) msg,
                            CmiSpanTreeParent(mype), ImmBocMsg, DynamicBocNum);
        }
 }
 
 
-InitiateDynamicBocBroadcast(msg, mydata)
+void InitiateDynamicBocBroadcast(msg, mydata)
 DYNAMIC_BOC_NUM_MSG *msg;
 char *mydata;
 {
@@ -533,7 +540,7 @@ TRACE(CmiPrintf("[%d] InitiateDynamicBocBroadcast: ref=%d, boc=%d, ep=%d\n",
 
 }
 
-DynamicBocInit()
+void DynamicBocInit(void)
 {
        CHARE_BLOCK *bocBlock;
 
@@ -544,7 +551,7 @@ DynamicBocInit()
 }
 
 
-DynamicAddSysBocEps()
+void DynamicAddSysBocEps(void)
 {
   CsvAccess(CkEp_DBOC_RegisterDynamicBocInitMsg) =
     registerBocEp("CkEp_DBOC_RegisterDynamicBocInitMsg",
index bf5c73d7a4bd9da54286d80d245ec4f9ab640ae5..ba7918ed902c8bb8897a8d77cacfede05cc0f170 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.2  1997-07-18 21:21:04  milind
+ * Revision 2.3  1997-10-29 23:52:44  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.2  1997/07/18 21:21:04  milind
  * all files of the form perf-*.c have been changed to trace-*.c, with
  * name expansions. For example, perf-proj.c has been changed to
  * trace-projections.c.
@@ -54,7 +57,7 @@ various offsets again and again, they have been made into variables,
 computed only once at initialization. Any changes made to the layout
 of the message must be reflected here. */
 /**********************************************************************/
-InitializeMessageMacros()
+void InitializeMessageMacros(void)
 {
 /* The message format is as follows :
         -------------------------------------
index becec67b233c6b0385acdd649669ed7a7474f8bf..77865d6957f59652ab0e49409d58ee17c15ee5cf 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.6  1995-10-19 18:21:18  jyelon
+ * Revision 2.7  1997-10-29 23:52:45  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.6  1995/10/19 18:21:18  jyelon
  * added typecasts to remove warnings.
  *
  * Revision 2.5  1995/10/13  18:15:53  jyelon
@@ -55,7 +58,7 @@ void condsendModuleInit()
   This function sends out a message using fields that it extracts from its one
   argument
  *****************************************************************************/
-static int SendMsgFn(arg)
+static void SendMsgFn(arg)
     void *arg;
 {
   SendMsgStuff *sendstruct;
@@ -70,7 +73,7 @@ static int SendMsgFn(arg)
   This function makes a BOC call using fields that it extracts from its one
   argument
  *****************************************************************************/
-static int CallBocFn(arg)
+static void CallBocFn(arg)
     void *arg;
 {
   CallBocStuff *cbocstruct;
index d23140d6309016e64bb7db79231aebb959480987..effc1c6fbce61a4741f9deb76de98e12118d9864 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.13  1997-03-24 23:10:13  milind
+ * Revision 2.14  1997-10-29 23:52:46  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.13  1997/03/24 23:10:13  milind
  * Made envelope 64-bit safe by replacing an int with a void *.
  *
  * Revision 2.12  1997/02/06 19:52:44  jyelon
@@ -133,7 +136,7 @@ typedef struct envelope {
 /*********************************************************/
 /** Arrangement for i_tag2                              **/
 /*********************************************************/
-#define GetEnv_count(e)                        ((int)(((ENVELOPE *)(e))->i_tag2))
+#define GetEnv_count(e)                        ((size_t)(((ENVELOPE *)(e))->i_tag2))
 #define SetEnv_count(e,x)              (((ENVELOPE *)(e))->i_tag2=((void *)(x)))
 
 #define GetEnv_chareBlockPtr(e)                ((CHARE_BLOCK *)(((ENVELOPE *)(e))->i_tag2))
@@ -142,7 +145,7 @@ typedef struct envelope {
 #define SetEnv_vidBlockPtr(e,x)                (((ENVELOPE *)(e))->i_tag2=(x))
 #define GetEnv_vidBlockPtr(e)          ((CHARE_BLOCK *)(((ENVELOPE *)(e))->i_tag2))
 
-#define GetEnv_boc_num(e)              ((int)(((ENVELOPE *)(e))->i_tag2))
+#define GetEnv_boc_num(e)              ((size_t)(((ENVELOPE *)(e))->i_tag2))
 #define SetEnv_boc_num(e,x)            (((ENVELOPE *)(e))->i_tag2=((void *)(x)))
 
 /*********************************************************/
index 1d6f0462a2376e9a971041c66c809270712cfaa1..2e927a9d9f1431a2d016d9e9edf4af3756fc2787 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.47  1997-10-03 19:51:35  milind
+ * Revision 2.48  1997-10-29 23:52:47  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.47  1997/10/03 19:51:35  milind
  * Made charmc to work again, after inserting trace calls in converse part,
  * i.e. threads and user events.
  *
@@ -279,6 +282,13 @@ extern void CkProcess_DynamicBocInitMsg();
 extern void CkProcess_NewChareMsg();
 extern void CkProcess_VidSendOverMsg();
 
+void SysPeriodicCheckInit(void);
+void CharmRegisterHandlers();
+void InitializeEPTables();
+void AddSysBocEps(void);
+void BroadcastCount(void);
+void SysBocInit(void);
+
 void initModuleInit()
 {
     CpvInitialize(char*, ReadBufIndex);
@@ -308,7 +318,7 @@ void _CkNullFunc()
 
 
 
-InitializeCharm(argc, argv)
+void InitializeCharm(argc, argv)
 int argc;
 char **argv;
 {
@@ -397,7 +407,7 @@ static void PropagateInitBarrier()
 }
 
 
-StartCharm(argc, argv, donehandler)
+void StartCharm(argc, argv, donehandler)
 int argc;
 char **argv;
 FUNCTION_PTR donehandler;
@@ -642,7 +652,7 @@ ENVELOPE       *envelope;
 
 /* this call can only be made after the clock has been initialized */
 
-SysPeriodicCheckInit()
+void SysPeriodicCheckInit(void)
 {
        /*
        CldPeriodicCheckInit();
@@ -732,7 +742,7 @@ char          **argv;
 
 #define TABLE_SIZE 256
 
-CharmRegisterHandlers()
+void CharmRegisterHandlers()
 {
   /* Register the Charm handlers with Converse */
   CsvAccess(BUFFER_INCOMING_MSG_Index)
@@ -751,7 +761,7 @@ CharmRegisterHandlers()
     = CmiRegisterHandler(CkProcess_VidSendOverMsg);
 }
 
-InitializeEPTables()
+void InitializeEPTables(void)
 {
   int             i;
   int             TotalFns;
@@ -886,7 +896,7 @@ InitializeEPTables()
 }
 
 /* Adding entry points for system branch office chares. */
-AddSysBocEps()
+void AddSysBocEps(void)
 {
        QDAddSysBocEps();
        WOVAddSysBocEps();
@@ -899,7 +909,7 @@ AddSysBocEps()
 
 
 /* Broadcast the count of messages that are received during initialization. */
-BroadcastCount()
+void BroadcastCount(void)
 {
        ENVELOPE       *env;
        void           *dummy_msg;
@@ -988,7 +998,7 @@ static ENVELOPE *DeQueueBocInitMsgs()
                return NULL ;
 }
 
-SysBocInit()
+void SysBocInit(void)
 {
        QDBocInit();
        TblBocInit();
@@ -999,7 +1009,7 @@ SysBocInit()
 
 
 
-hostep_error(msg, mydata)
+void hostep_error(msg, mydata)
 void           *msg, *mydata;
 {
        CmiPrintf("****error*** main chare ep called on node %d.\n",
index 9e1fd9055fde04d98806ecf6cd63308333d37d3e..47f88f591a6d13912372106ab2306a037c762aea 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.15  1997-03-24 23:09:35  milind
+ * Revision 2.16  1997-10-29 23:52:48  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.15  1997/03/24 23:09:35  milind
  * Corrected alignment problems on 64-bit machines.
  *
  * Revision 2.14  1995/10/27 09:09:31  jyelon
@@ -137,7 +140,7 @@ unsigned int msgbytes;
 
 
 
-CkFreeMsg(ptr)
+void CkFreeMsg(ptr)
 char *ptr;
 {
     ENVELOPE *envptr;
@@ -207,7 +210,7 @@ allocfn(id, msgsize, sizearray, prio)
 
 - Sanjeev
 
-/*****************************************************************/
+*****************************************************************/
 
 void *GenericCkAlloc(msgno, msgbytes, priobits)
 int msgno;
index 4be3a70d788ee1ea8791fe0252a4d5c72c41f9ec..a98f7d5ff6b77d79add33b7cd63eba746b21e2a9 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.4  1995-09-01 02:13:17  jyelon
+ * Revision 2.5  1997-10-29 23:52:49  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.4  1995/09/01 02:13:17  jyelon
  * VID_BLOCK, CHARE_BLOCK, BOC_BLOCK consolidated.
  *
  * Revision 2.3  1995/07/27  20:29:34  jyelon
@@ -46,6 +49,8 @@ extern void * CPlus_GetMonoMsgPtr() ;
 extern void CPlus_CallUpdateFn() ;
 extern void CPlus_SetMonoId() ;
 
+void _CK_BroadcastMono();
+
 
 void * MonoValue(bocnum)
 int bocnum;
@@ -70,7 +75,7 @@ ChareIDType *ReturnID;
 }
 
 
-MONO_BranchInit_Fn(msg, mydata)
+void MONO_BranchInit_Fn(msg, mydata)
 void *msg;
 MONO_DATA *mydata;
 {
@@ -90,7 +95,7 @@ MONO_DATA *mydata;
 
 
 
-_CK_9MONO_BranchNewValue(mydata, x)
+void _CK_9MONO_BranchNewValue(mydata, x)
 MONO_DATA *mydata; 
 char *x;
 {
@@ -102,7 +107,7 @@ char *x;
 }
 
 
-MONO_BranchUpdate_Fn(msg, mydata)
+void MONO_BranchUpdate_Fn(msg, mydata)
 char *msg;
 MONO_DATA *mydata;
 {
@@ -136,7 +141,7 @@ MONO_DATA *mydata ;
                return(mydata->dataptr) ;
 }
 
-_CK_BroadcastMono(msg, bocnum)
+void _CK_BroadcastMono(msg, bocnum)
 void *msg ; 
 int bocnum ;
 {
@@ -148,7 +153,7 @@ int bocnum ;
 }
 
 
-MonoAddSysBocEps()
+void MonoAddSysBocEps(void)
 {
   CsvAccess(CkChare_MONO) =
     registerChare("CkChare_MONO",sizeof(MONO_DATA),NULL);
index 3d9693b0a7c57f9ab4362eff64987c8b1e49899d..4f8a6db55c905087a2b9bd779ac1f98bdca64578 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.5  1997-02-13 17:32:40  milind
+ * Revision 1.6  1997-10-29 23:52:50  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 1.5  1997/02/13 17:32:40  milind
  * Fixed a minor typo in CmiSignal in convcore.c.
  * Changed net-hp-cc/conv-mach.h to set ASYNC_NOT_NEEDED.
  *
@@ -144,9 +147,10 @@ CpvStaticDeclare(int, QDdirty);
 
 CpvStaticDeclare(int, countResponses); /* # of rspnses received from children in this phase. */
 
+void InsertQuiescenceList();
 
 
-void quiesModuleInit()
+void quiesModuleInit(void)
 {
    CpvInitialize(LIST_, creation_list);
    CpvInitialize(LIST_, process_list);
@@ -225,7 +229,7 @@ The next two procedures start quiescence and insert every request into
 quiescence list, so that when quiescence is detected a message can be 
 sent back to the user at every requested entry point.
 ***************************************************************************/
-StartQuiescence(ep, chareid)
+void StartQuiescence(ep, chareid)
 EntryPointType ep;
 ChareIDType *chareid;
 {
@@ -243,7 +247,7 @@ ChareIDType *chareid;
 }
 
 
-InsertQuiescenceList(msgptr, localdataptr)
+void InsertQuiescenceList(msgptr, localdataptr)
 START_QUIESCENCE_MSG *msgptr;
 void *localdataptr;
 {
index 5bba2bcb37e1982927b0fc8cc004681bba2ec7de..7e90758d00beb9a6edcac444dfbea9eeb01a6357 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.8  1997-07-18 21:21:10  milind
+ * Revision 2.9  1997-10-29 23:52:51  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.8  1997/07/18 21:21:10  milind
  * all files of the form perf-*.c have been changed to trace-*.c, with
  * name expansions. For example, perf-proj.c has been changed to
  * trace-projections.c.
@@ -74,7 +77,7 @@ CpvExtern(char *, ReadFromBuffer);
 /* The following functions are used to copy the read-buffer out of and         */
 /* into the read only variables.                                       */
 /************************************************************************/
-_CK_13CopyToBuffer(srcptr, var_size) 
+void _CK_13CopyToBuffer(srcptr, var_size) 
 char *srcptr;
 int var_size;
 {
@@ -84,7 +87,7 @@ int var_size;
     *CpvAccess(ReadBufIndex)++ = *srcptr++;
 }
 
-_CK_13CopyFromBuffer(destptr, var_size) 
+void _CK_13CopyFromBuffer(destptr, var_size) 
 char *destptr;
 int var_size;
 {
@@ -95,7 +98,7 @@ int var_size;
 }
 
 
-BroadcastReadBuffer(ReadBuffer, size, mainChareBlock)
+void BroadcastReadBuffer(ReadBuffer, size, mainChareBlock)
 char *ReadBuffer;
 int size;
 struct chare_block * mainChareBlock;
@@ -115,7 +118,7 @@ struct chare_block * mainChareBlock;
 }
 
 
-ReadMsgInit(msg, id)
+void ReadMsgInit(msg, id)
 char *msg;
 int id;
 {
index 9ff3854e2906ffbe015c4121848a20cd0bb38912..df5b58208cb2ce361f5cdcb0860e77a27aa1181f 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.9  1997-08-22 19:29:07  milind
+ * Revision 2.10  1997-10-29 23:52:52  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.9  1997/08/22 19:29:07  milind
  * Added user-event tracing.
  *
  * Revision 2.8  1996/03/28 14:45:11  kale
@@ -121,8 +124,8 @@ int size ;
        return(CpvAccess(msgCount)-1) ;
 }
 
-setThreadedEp( int entry) {
-(CsvAccess(EpInfoTable)+ entry)->threaded = 1;
+void setThreadedEp( int entry) {
+  (CsvAccess(EpInfoTable)+ entry)->threaded = 1;
 }
 
 void SetEp(ep,name,function,language,messageindex,chareindex,chare_or_boc)
index bc75c3c74bb742e84d1ce1ba6e80b72bba126a4d..101f1624e4487c05fec98741e101680b1c95b30c 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.15  1997-10-03 19:51:36  milind
+ * Revision 2.16  1997-10-29 23:52:53  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.15  1997/10/03 19:51:36  milind
  * Made charmc to work again, after inserting trace calls in converse part,
  * i.e. threads and user events.
  *
@@ -117,7 +120,7 @@ void statModuleInit()
 
 
 
-StatInit()
+void StatInit(void)
 {
        CHARE_BLOCK *bocBlock;
        int i;
@@ -128,7 +131,7 @@ StatInit()
                CpvAccess(RecdStatMsg) = 0;
 }
 
-StatisticBocInit()
+void StatisticBocInit(void)
 {
        CHARE_BLOCK *bocBlock;
 
@@ -138,7 +141,7 @@ StatisticBocInit()
 }
 
 
-NodeCollectStatistics(msgPtr, localdataPtr)
+void NodeCollectStatistics(msgPtr, localdataPtr)
 void *msgPtr;
 void *localdataPtr;
 {
@@ -181,7 +184,7 @@ TRACE(CmiPrintf("Node %d: Enter NodeCollectStatistics() \n", CmiMyPe()));
 
 
 
-CollectStatistics()
+void CollectStatistics(void)
 {
        DUMMY_STAT_MSG *mPtr;
 
@@ -194,7 +197,7 @@ CollectStatistics()
 }
 
 
-CollectFromNodes(msgPtr, localdataptr)
+void CollectFromNodes(msgPtr, localdataptr)
 void *msgPtr, *localdataptr;
 {
        int i,j,k;
@@ -254,7 +257,7 @@ TRACE(CmiPrintf("Host %d: Enter CollectFromNodes(): NumPes %d\n",
 
 
 
-PrintOutStatistics()
+void PrintOutStatistics(void)
 {
        int i,j,k;
        int col = 0;
@@ -352,7 +355,7 @@ PrintOutStatistics()
        }
 }
 
-StatAddSysBocEps()
+void StatAddSysBocEps(void)
 {
   extern BroadcastExitMessage(), ExitMessage();
 
index 2db1c4fdcfa70abbe6279b7538e7512e60995f67..b3d704e86f0747c5a6dc803ee31888bb71ec6517 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.10  1997-07-18 21:21:12  milind
+ * Revision 2.11  1997-10-29 23:52:53  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.10  1997/07/18 21:21:12  milind
  * all files of the form perf-*.c have been changed to trace-*.c, with
  * name expansions. For example, perf-proj.c has been changed to
  * trace-projections.c.
@@ -77,6 +80,10 @@ extern CHARE_BLOCK *CreateChareBlock();
 typedef struct tbl_element *TBL_ELEMENT_[MAX_TBL_SIZE];
 CpvStaticDeclare(TBL_ELEMENT_, table);
 
+void TblInsert();
+void TblDelete();
+void TblFind();
+
 
 void tblModuleInit()
 {
@@ -87,7 +94,7 @@ void tblModuleInit()
 
 
 
-TblBocInit()
+void TblBocInit(void)
 {
        CHARE_BLOCK *bocBlock;
        int i;
@@ -206,7 +213,7 @@ int i;
 /*     This function copies structures.                                */
 /************************************************************************/
 
-structure_copy(x, y, size)
+void structure_copy(x, y, size)
 char *x, *y;
 int size;
 {
@@ -269,7 +276,7 @@ TBL_ELEMENT * ptr;
 /************************************************************************/
 /*     This function packs the key, data etc for an entry              */
 /************************************************************************/
-char *
+void
 pack(operation, tbl, index, penum, key, data, size_data, entry,chareid, option)
 char *operation, *tbl, *index;
 int  penum;
@@ -338,7 +345,7 @@ TRACE(CmiPrintf("[%d] Pack:: size_chareid=%d, total_size=%d\n",
                }
                structure_copy(ptr, entry, size);
                ptr += size;
-               structure_copy(ptr, &size_chareid, size);
+               structure_copy(ptr, (char *) &size_chareid, size);
                ptr += size;
                structure_copy(ptr, option, size);
                ptr += size;
@@ -362,7 +369,7 @@ TRACE(CmiPrintf("[%d] Pack:: size_chareid=%d, total_size=%d\n",
 /*     to be inserted.                                                 */
 /************************************************************************/
 
-TblInsert(tbl, index, key, data, size_data, entry, chareid, option)
+void TblInsert(tbl, index, key, data, size_data, entry, chareid, option)
 int tbl;
 int index;
 int key;
@@ -392,8 +399,8 @@ int option;
                return;
        }
        if ( (index == -1) && (place->penum != CmiMyPe()))
-               pack(&operation, &tbl, &(place->index), place->penum,
-                        &key,  data, &size_data, &entry, chareid, &option);
+               pack((char *) &operation, (char *) &tbl, (char *) &(place->index), place->penum,
+                        (char *) &key,  data, (char *) &size_data, (char *) &entry, (char *) chareid, (char *) &option);
        else
        {
                if (index == -1) index = place->index;
@@ -423,24 +430,24 @@ TRACE(CmiPrintf("TblInsert :: table entry created with key %d\n", key));
                        {
 TRACE(CmiPrintf("TblInsert :: Pending request key is %d  - data is %d\n",
                ptr->key, *((int *) data)));
-                               pack(&operation, &tbl, &index, GetID_onPE(temp->chareid),
-                                               &ptr->key, ptr->data, &size_data,
-                                               &temp->entry, &temp->chareid, &option);
+                               pack((char *) &operation, (char *) &tbl, (char *) &index, GetID_onPE(temp->chareid),
+                                               (char *) &ptr->key, ptr->data, (char *) &size_data,
+                                               (char *) &temp->entry, (char *) &temp->chareid, (char *) &option);
                                temp = temp->next;
                        };
                        if ((entry != -1) && (chareid != NULL))
-                               pack(&operation, &tbl, &index, GetID_onPE((*chareid)),
-                                               &ptr->key, ptr->data, &size_data,  
-                                               &entry, chareid, &option);
+                               pack((char *) &operation, (char *) &tbl, (char *) &index, GetID_onPE((*chareid)),
+                                               (char *) &ptr->key, ptr->data, (char *) &size_data,  
+                                               (char *) &entry, (char *) chareid, (char *) &option);
                }
                else
                {
                        if ((entry != -1) && (chareid != NULL))
                        {
-                               pack(&operation, &tbl, &index,
+                               pack((char *) &operation, (char *) &tbl, (char *) &index,
                                        GetID_onPE((*chareid)),
-                                        &ptr->key, ptr->data, &ptr->size_data,
-                                        &entry, chareid, &option);
+                                        (char *) &ptr->key, ptr->data, (char *)&ptr->size_data,
+                                        (char *)&entry, (char *) chareid, (char *)&option);
                        } 
                }
        }
@@ -454,7 +461,7 @@ TRACE(CmiPrintf("TblInsert :: Pending request key is %d  - data is %d\n",
 /*     to be deleted.                                                  */
 /************************************************************************/
 
-TblDelete(tbl, index, key, entry, chareid, option)
+void TblDelete(tbl, index, key, entry, chareid, option)
 int tbl;
 int index;
 int key;
@@ -479,8 +486,8 @@ int option;
                trace_table(DELETE, tbl, key, CmiMyPe());
 
        if ( (index == -1) && ( place->penum != CmiMyPe()))
-               pack(&operation, &tbl, &(place->index), place->penum,
-                        &key, data, &size,  &entry, chareid, &option);
+               pack((char *) &operation, (char *) &tbl, (char *) &(place->index), place->penum,
+                        (char *) &key, data, (char *) &size,  (char *) &entry, (char *) chareid, (char *) &option);
        else
        {
                if (index == -1) index  = place->index;
@@ -495,14 +502,14 @@ int option;
                }
                operation = 3;
                if ( (ptr1 != NULL) && (entry != -1) && (chareid != NULL)) 
-                       pack(&operation, &tbl, &index, 
+                       pack((char *) &operation, (char *) &tbl, (char *) &index, 
                                GetID_onPE((*chareid)),
-                               &ptr1->key, ptr1->data, &ptr1->size_data,
-                               &entry, chareid, &option);
+                               (char *) &ptr1->key, ptr1->data, (char *) &ptr1->size_data,
+                               (char *) &entry, (char *) chareid, (char *) &option);
                if ( (ptr1 == NULL) && (entry != -1) && (chareid != NULL) 
                                    && (option == TBL_REPLY))
-                       pack(&operation, &tbl, &index, GetID_onPE((*chareid)),
-                                &key, data, &size, &entry, chareid, &option);
+                       pack((char *) &operation, (char *) &tbl, (char *) &index, GetID_onPE((*chareid)),
+                                (char *) &key, data, (char *) &size, (char *) &entry, (char *) chareid, (char *) &option);
                if (ptr2 == NULL) 
                        if (ptr1 != NULL)
                        {
@@ -529,7 +536,7 @@ int option;
 /*     the element may exist with information about element to be found*/
 /************************************************************************/
 
-TblFind( tbl, index, key, entry, chareid, option)
+void TblFind( tbl, index, key, entry, chareid, option)
 int tbl;
 int index;
 int key;
@@ -556,8 +563,8 @@ int option;
 
 
        if ( (index == -1) && (place->penum != CmiMyPe()))
-               pack(&operation, &tbl, &(place->index), place->penum,
-                        &key, data, &size, &entry, chareid, &option);
+               pack((char *) &operation, (char *) &tbl, (char *) &(place->index), place->penum,
+                        (char *) &key, data, (char *) &size, (char *) &entry, (char *) chareid, (char *) &option);
        else
        {
                if (index == -1) index = place->index;
@@ -571,20 +578,20 @@ TRACE(CmiPrintf("[%d] TblFind: ptr=0x%x, entry=%d, option=%d, index=%d\n",
                        if (ptr->isDefined)
                                {
                                if ((entry != -1) && (chareid != NULL))
-                                       pack(&operation, &tbl, &index, 
-                                               GetID_onPE((*chareid)), &key, 
-                                               ptr->data, &ptr->size_data,
-                                               &entry, chareid, &option);
+                                       pack((char *) &operation, (char *) &tbl, (char *) &index, 
+                                               GetID_onPE((*chareid)), (char *) &key, 
+                                               ptr->data, (char *) &ptr->size_data,
+                                               (char *) &entry, (char *) chareid, (char *) &option);
                                }
                        else
                        {
                           if (option == TBL_NEVER_WAIT)
                           {
                                if ((entry != -1) && (chareid != NULL))
-                                       pack(&operation, &tbl, &index, 
-                                               GetID_onPE((*chareid)), &key,
-                                               data, &size,
-                                               &entry, chareid, &option);
+                                       pack((char *) &operation, (char *) &tbl, (char *) &index, 
+                                               GetID_onPE((*chareid)), (char *) &key,
+                                               data, (char *) &size,
+                                               (char *) &entry, (char *) chareid, (char *) &option);
                           }
                           else
                           {
@@ -630,17 +637,17 @@ TRACE(CmiPrintf("[%d] TblFind: Going to send message.\n"));
                        }
                        else
                           if ((entry != -1) && (chareid != NULL)) 
-                               pack(&operation, &tbl, &index, 
+                               pack((char *) &operation, (char *) &tbl, (char *) &index, 
                                        GetID_onPE((*chareid)),
-                                       &key, data, &size, &entry, chareid,
-                                       &option);
+                                       (char *) &key, data, (char *) &size, (char *) &entry, (char *) chareid,
+                                       (char *) &option);
 TRACE(CmiPrintf("[%d] TblFind: Sent message.\n"));
 
                }
        }
 }
 
-TblAddSysBocEps()
+void TblAddSysBocEps(void)
 {
   CsvAccess(CkEp_Tbl_Unpack) =
     registerBocEp("CkEp_Tbl_Unpack",
index 481a0a13fd6bc60265ce89e2f130ac9ac30d0681..b1d8a7de5d8f459dff129570c82313a2428bd145 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.10  1997-07-18 21:21:13  milind
+ * Revision 2.11  1997-10-29 23:52:54  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.10  1997/07/18 21:21:13  milind
  * all files of the form perf-*.c have been changed to trace-*.c, with
  * name expansions. For example, perf-proj.c has been changed to
  * trace-projections.c.
@@ -88,7 +91,7 @@ EpLanguageTable to be indexed by 65535 in CallProcessMsg.
 #include "trace.h"
 #include "vid.h"
 
-VidEnqueueMsg(env)
+void VidEnqueueMsg(env)
 ENVELOPE *env;
 {
   CHARE_BLOCK *vid = GetEnv_chareBlockPtr(env);
@@ -96,7 +99,7 @@ ENVELOPE *env;
   FIFO_EnQueue(vidqueue, env);
 }
 
-VidForwardMsg(env)
+void VidForwardMsg(env)
 ENVELOPE *env;
 {
   CHARE_BLOCK *vid = GetEnv_chareBlockPtr(env);
@@ -116,7 +119,7 @@ ENVELOPE *env;
 /*      to the processor on which the chare was finally created.        */
 /************************************************************************/
 
-VidSendOverMessages(msgPtr, data_area)
+void VidSendOverMessages(msgPtr, data_area)
 CHARE_ID_MSG *msgPtr;
 void *data_area;
 {
@@ -160,7 +163,7 @@ void *data_area;
 /*      messages that were stored in its VID                            */
 /************************************************************************/
 
-VidRetrieveMessages(chareblockPtr,vidPE,vidBlockPtr)
+void VidRetrieveMessages(chareblockPtr,vidPE,vidBlockPtr)
 CHARE_BLOCK * chareblockPtr;
 PeNumType  vidPE;
 CHARE_BLOCK *vidBlockPtr;
index 965b4d3e85710c2e8636c198f222c032c2b0a7f8..01d3a865401cc049ef205b81d306139548bf4515 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.6  1995-09-07 21:21:38  jyelon
+ * Revision 2.7  1997-10-29 23:52:55  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.6  1995/09/07 21:21:38  jyelon
  * Added prefixes to Cpv and Csv macros, fixed bugs thereby revealed.
  *
  * Revision 2.5  1995/09/06  21:48:50  jyelon
@@ -52,6 +55,8 @@ static char ident[] = "@(#)$Header$";
 #include "wrtone.h"
 
 extern CHARE_BLOCK *CreateChareBlock();
+void HostReceiveAcknowledge();
+
 
 /*****************************************************************************
 *****************************************************************************/
@@ -215,7 +220,7 @@ TRACE(CmiPrintf("Host::  HostAddWriteOnceVar...wovID %d, size %d\n",
  in question. We can then send a message to the user program on the originating
  node, telling the user that it is now ok to access the WOV, or to broadcast
  the id to other nodes, or whatever.  ***************************************************************************/ 
-HostReceiveAcknowledge(msgptr_,localdataptr_)
+void HostReceiveAcknowledge(msgptr_,localdataptr_)
 void *msgptr_,*localdataptr_;
 {
        Ack_To_Host_Msg *ackMessage    = (Ack_To_Host_Msg *) msgptr_;
@@ -266,14 +271,14 @@ ChareIDType    cid;
                *dest++ = *src++;
        /* here we bypass the SendMsg function and just call directly */
        if (CmiMyPe() == 0)
-               HostAddWriteOnceVar(newWov,GetBocDataPtr(WOVBocNum));
+               HostAddWriteOnceVar((void *)newWov,(void *)GetBocDataPtr(WOVBocNum));
        else
                GeneralSendMsgBranch(CsvAccess(CkEp_WOV_HostAddWOV), newWov,
                    0, ImmBocMsg, WOVBocNum);
 }
 
 
-WOVAddSysBocEps()
+void WOVAddSysBocEps(void)
 {
   CsvAccess(CkEp_WOV_AddWOV) =
     registerBocEp("CkEp_WOV_AddWOV",
index 9ea026a246a060ea4a69b7089115fb6c8c69e958..8d98efe94c694344ac822f49aaca922bf0f66b99 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.6  1997-07-30 17:31:04  jyelon
+ * Revision 2.7  1997-10-29 23:52:57  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.6  1997/07/30 17:31:04  jyelon
  * *** empty log message ***
  *
  * Revision 2.5  1995/11/06 17:55:09  milind
@@ -93,7 +96,7 @@ CldTOK_HOLDER *new_CldTOK_HOLDER(sendfn, msgptr)
 /******************************************************************
  * This function adds a token to the end of the token list 
  ******************************************************************/
-int CldAddToken(msg, sendfn, queuing, priolen, prioptr)
+void CldAddToken(msg, sendfn, queuing, priolen, prioptr)
     void *msg; void (*sendfn)();
     unsigned int queuing, priolen, *prioptr;
 {
index f1b93b27df5657393309a9f281e73d29025b7b42..dd6ef9b276198a65f0b019fd4f02b82e56a78ee4 100644 (file)
@@ -1,64 +1,68 @@
 #include "chare.h"
 
 CpvExtern(int, CtrRecdTraceMsg);
+CpvExtern(CthThread, cThread);
 
-void traceModuleInit(pargc, argv) int *pargc; char **argv; {}
+void traceModuleInit(pargc, argv) int *pargc; char **argv; 
+{
+  CpvInitialize(CthThread, cThread);
+}
 
-program_name(s,m) char *s, *m; {}
+void program_name(s,m) char *s, *m; {}
 
-log_init() {CpvAccess(CtrRecdTraceMsg) = 1;}
+void log_init(void) {CpvAccess(CtrRecdTraceMsg) = 1;}
 
-trace_user_event(int eventNum)
+void trace_user_event(int eventNum)
 {}
 
-trace_creation(msg_type,entry,envelope)
+void trace_creation(msg_type,entry,envelope)
 int msg_type, entry;
 void *envelope;
 {}
 
-trace_begin_execute(envelope)
+void trace_begin_execute(envelope)
 void *envelope;
 {}
 
-trace_end_execute(id,msg_type,entry)
+void trace_end_execute(id,msg_type,entry)
 int id, msg_type, entry;
 {}
 
-trace_begin_charminit()
+void trace_begin_charminit(void)
 {}
 
-trace_end_charminit()
+void trace_end_charminit(void)
 {}
 
-trace_begin_idle()
+void trace_begin_idle(void)
 {}
 
-trace_end_idle()
+void trace_end_idle(void)
 {}
 
-trace_begin_computation()
+void trace_begin_computation(void)
 {}
 
-trace_enqueue(envelope)
+void trace_enqueue(envelope)
 void *envelope;
 {}
 
-trace_dequeue(envelope)
+void trace_dequeue(envelope)
 void *envelope;
 {}
 
-trace_table(type,tbl,key,pe)
+void trace_table(type,tbl,key,pe)
 int type,tbl,key,pe;
 {}
 
 
-send_log() {}
+void send_log(void) {}
 
-CollectTraceFromNodes(msg, data)
+void CollectTraceFromNodes(msg, data)
 char msg, data;
 {}
 
-close_log(){}
+void close_log(void){}
 
 void PrintStsFile(str)
 char *str ;
index 72b2ff67dca2c1606d4e0b9a1ee562416e4f1034..6573dddc8d7f6d50c0257f0a8abee7a8d293beb2 100644 (file)
@@ -53,7 +53,11 @@ extern void setEvent(CthThread t, int event);
 extern int getEvent(CthThread t);
 /* end addition */
 
-traceModuleInit(pargc, argv)
+void add_to_buffer();
+void program_name();
+void wrtlog();
+
+void traceModuleInit(pargc, argv)
 int *pargc;
 char **argv;
 {
@@ -92,7 +96,7 @@ char *str ;
 
 
 /**********All the trace functions *****************/
-trace_user_event(int eventNum)
+void trace_user_event(int eventNum)
 {
     add_to_buffer(USER_EVENT, eventNum, -1,
                             CkUTimer(), CpvAccess(current_event),
@@ -100,7 +104,7 @@ trace_user_event(int eventNum)
     CpvAccess(current_event) += 1;
 }
 
-trace_creation(msg_type, entry, envelope)
+void trace_creation(msg_type, entry, envelope)
 int msg_type, entry;
 ENVELOPE *envelope;
 {
@@ -130,7 +134,7 @@ ENVELOPE *envelope;
   CpvAccess(current_event) += CpvAccess(iteration);  
 }
 
-trace_begin_execute(envelope)
+void trace_begin_execute(envelope)
 ENVELOPE *envelope;
 {
   int msg_type;
@@ -156,7 +160,7 @@ ENVELOPE *envelope;
          CpvAccess(begin_event), CpvAccess(begin_pe));
 }
 
-trace_end_execute(id, msg_type, entry)
+void trace_end_execute(id, msg_type, entry)
 int id, msg_type, entry;
 {
 /* Addition for threads tracing */
@@ -171,19 +175,19 @@ int id, msg_type, entry;
             CpvAccess(begin_event), CpvAccess(begin_pe));
 }
 
-trace_begin_idle()
+void trace_begin_idle(void)
 {
   /* msgtype, entry, and event are not used */
   add_to_buffer(BEGIN_IDLE, 0, 0, CkUTimer(), 0, CmiMyPe());
 }
 
-trace_end_idle()
+void trace_end_idle(void)
 {
   /* msgtype, entry, and event are not used */
   add_to_buffer(END_IDLE, 0, 0, CkUTimer(), 0, CmiMyPe());
 }
 
-trace_begin_charminit(
+void trace_begin_charminit(void
 {
     int *msg;
     ENVELOPE *envelope;
@@ -197,14 +201,14 @@ trace_begin_charminit()
 
 }
 
-trace_end_charminit(
+void trace_end_charminit(void
 {
     add_to_buffer(END_PROCESSING, NewChareMsg, -1, CkUTimer(),
       CpvAccess(store_event), CpvAccess(store_pe));
 }
 
 
-trace_enqueue(envelope)
+void trace_enqueue(envelope)
 ENVELOPE *envelope;
 {
   int add=0;
@@ -218,7 +222,7 @@ ENVELOPE *envelope;
           GetEnv_event(envelope)+add, GetEnv_pe(envelope));
 }
 
-trace_dequeue(envelope)
+void trace_dequeue(envelope)
 ENVELOPE *envelope;
 {
   int add=0;
@@ -232,13 +236,13 @@ ENVELOPE *envelope;
           GetEnv_event(envelope), GetEnv_pe(envelope));
 }
 
-trace_table(type, tbl, key, pe)
+void trace_table(type, tbl, key, pe)
 int type, tbl, key, pe;
 {
   add_to_buffer(type, tbl, key, CkUTimer(), -1, pe);
 }
 
-trace_begin_computation()
+void trace_begin_computation(void)
 {
 /* Addition for threads tracing */
   CpvAccess(threadMsg) = registerMsg("dummy_thread_msg", 0, 0, 0, 0);
@@ -250,7 +254,7 @@ trace_begin_computation()
   add_to_buffer(BEGIN_COMPUTATION, -1, -1, CkUTimer(), -1, -1);
 }
 
-trace_end_computation()
+void trace_end_computation(void)
 {
   add_to_buffer(END_COMPUTATION, -1, -1, CkUTimer(), -1, -1, -1);
 }
@@ -260,7 +264,7 @@ trace_end_computation()
 /***   out on the output file.                **/
 /***********************************************************************/ 
 
-add_to_buffer(type, msg_type, entry, t1, event, pe)
+void add_to_buffer(type, msg_type, entry, t1, event, pe)
 int type;
 int msg_type;
 int entry;
@@ -313,7 +317,7 @@ CmiMyPe(), CpvAccess(logcnt), type, msg_type, entry, t1, t2, event));
 /***   set up the log files.                **/
 /***********************************************************************/ 
 
-log_init()
+void log_init(void)
 { 
   int pe;
   int length;
@@ -357,7 +361,7 @@ log_init()
 /*** the log files.                  **/
 /***********************************************************************/ 
 
-close_log()
+void close_log(void)
 {
   int i;
   int pe;
@@ -433,7 +437,7 @@ close_log()
 /***********************************************************************/ 
 /***  This function is used to determine the name of the program.     **/
 /***********************************************************************/ 
-program_name(s)
+void program_name(s)
 char *s;
 {
   CpvAccess(pgm) = (char *) malloc(strlen(s) + 1);
@@ -446,7 +450,7 @@ char *s;
 /***  buffer is full, or the program has terminated.          **/
 /***********************************************************************/ 
 
-wrtlog(pe, buffer, count)
+void wrtlog(pe, buffer, count)
 int pe;
 LOGSTR *buffer;
 int count;
@@ -471,10 +475,9 @@ int count;
 }
 
 
+void send_log(void) {}
 
-send_log() {}
-
-CollectTraceFromNodes(msg, data)
+void CollectTraceFromNodes(msg, data)
 char  msg, data;
 {}
 
index 1506cc7945dca5c6fb58c5e9a084b19172eec18e..ab160a551f62b37f5495b430c3286a0ac1e34f00 100644 (file)
@@ -27,7 +27,13 @@ CpvDeclare(int,num_childmsgs);
 
 CpvExtern(int,RecdStatMsg);
 
-traceModuleInit(pargc, argv)
+void adjust_time_interval(unsigned int);
+void adjust_timestep();
+void compute_busy();
+void program_name();
+void update_display();
+
+void traceModuleInit(pargc, argv)
 int *pargc;
 char **argv;
 {
@@ -48,67 +54,67 @@ char **argv;
   program_name(argv[0],nodename);
 }
 
-trace_creation(msg_type, entry, envelope)
+void trace_creation(msg_type, entry, envelope)
 int msg_type, entry;
 ENVELOPE *envelope;
 {
-       CpvAccess(now) = CkTimer(); 
-       adjust_time_interval(CpvAccess(now));
-       CpvAccess(display_index) = get_creation_display_index(msg_type); 
-       if (CpvAccess(display_index) >=0)
-               CpvAccess(display_table)[CpvAccess(display_index)][CpvAccess(current_time_interval)] += 1;
+  CpvAccess(now) = CkTimer(); 
+  adjust_time_interval(CpvAccess(now));
+  CpvAccess(display_index) = get_creation_display_index(msg_type); 
+  if (CpvAccess(display_index) >=0)
+    CpvAccess(display_table)[CpvAccess(display_index)][CpvAccess(current_time_interval)] += 1;
 }
 
-trace_begin_execute(envelope)
+void trace_begin_execute(envelope)
 ENVELOPE *envelope;
 {
-       int msg_type = GetEnv_msgType(envelope);
-       if (((msg_type == BocMsg) || (msg_type == BroadcastBocMsg) ||
-                       (msg_type == QdBocMsg) || (msg_type == QdBroadcastBocMsg)) &&
-               (GetEnv_EP(envelope) < CsvAccess(NumSysBocEps)))
-               return;
-
-       CpvAccess(now) = CkTimer(); 
-       adjust_time_interval(CpvAccess(now));
-       CpvAccess(start_processing_time) = CpvAccess(now);
-       CpvAccess(last_time_interval) = CpvAccess(current_time_interval);
+  int msg_type = GetEnv_msgType(envelope);
+  if (((msg_type == BocMsg) || (msg_type == BroadcastBocMsg) ||
+                 (msg_type == QdBocMsg) || (msg_type == QdBroadcastBocMsg)) &&
+    (GetEnv_EP(envelope) < CsvAccess(NumSysBocEps)))
+    return;
+
+  CpvAccess(now) = CkTimer(); 
+  adjust_time_interval(CpvAccess(now));
+  CpvAccess(start_processing_time) = CpvAccess(now);
+  CpvAccess(last_time_interval) = CpvAccess(current_time_interval);
 }
 
 
-trace_end_execute(id, msg_type, entry)
+void trace_end_execute(id, msg_type, entry)
 int id, msg_type, entry;
 {
-       if (CpvAccess(start_processing_time) == -1)
-               return;
-       CpvAccess(now) = CkTimer(); 
-       adjust_time_interval(CpvAccess(now));
-       CpvAccess(display_index) = get_processing_display_index(msg_type);
-       compute_busy(CpvAccess(start_processing_time), CpvAccess(now), CpvAccess(last_time_interval), 
-                       CpvAccess(current_time_interval));
-       if (CpvAccess(display_index) >= 0) 
-               update_display(CpvAccess(display_index), CpvAccess(last_time_interval),
-                               CpvAccess(current_time_interval)); 
-       CpvAccess(start_processing_time) = CpvAccess(last_time_interval) = -1;
+  if (CpvAccess(start_processing_time) == -1)
+    return;
+  CpvAccess(now) = CkTimer(); 
+  adjust_time_interval(CpvAccess(now));
+     CpvAccess(display_index) = get_processing_display_index(msg_type);
+  compute_busy(CpvAccess(start_processing_time), CpvAccess(now), CpvAccess(last_time_interval), 
+      CpvAccess(current_time_interval));
+  if (CpvAccess(display_index) >= 0) 
+    update_display(CpvAccess(display_index), CpvAccess(last_time_interval),
+        CpvAccess(current_time_interval)); 
+  CpvAccess(start_processing_time) = CpvAccess(last_time_interval) = -1;
 }
 
-trace_begin_charminit()
+void trace_begin_charminit(void)
 {}
 
-trace_end_charminit()
+void trace_end_charminit(void)
 {}
 
-trace_begin_computation()
+void trace_begin_computation(void)
 {}
 
-trace_enqueue(envelope)
+void trace_enqueue(envelope)
 ENVELOPE *envelope;
 {}
 
-trace_dequeue(envelope)
+void trace_dequeue(envelope)
 ENVELOPE *envelope;
 {}
 
-trace_table(type,tbl,key,pe)
+void trace_table(type,tbl,key,pe)
 int type,tbl,key,pe;
 {}
 
@@ -117,101 +123,101 @@ int type,tbl,key,pe;
 /***********************************************************************/ 
 /***********************************************************************/ 
 
-adjust_time_interval(time)
+void adjust_time_interval(time)
 unsigned int time;
 {
-       int temp_time_interval = MAXLOGMSGSIZE - 1;
+  int temp_time_interval = MAXLOGMSGSIZE - 1;
 
-       CpvAccess(current_time_interval) = (time - CpvAccess(init_time)) / CpvAccess(timestep);
-       while (CpvAccess(current_time_interval) >= MAXLOGMSGSIZE)
-       {
+  CpvAccess(current_time_interval) = (time - CpvAccess(init_time)) / CpvAccess(timestep);
+  while (CpvAccess(current_time_interval) >= MAXLOGMSGSIZE)
+  {
 TRACE(CmiPrintf("[%d] adjust_time_interval: current_time_interval=%d\n", 
 CmiMyPe(), CpvAccess(current_time_interval)));
 
-               adjust_timestep(&CpvAccess(timestep), &temp_time_interval,
-                               CpvAccess(display_table), 2);
-               CpvAccess(current_time_interval) = (time - CpvAccess(init_time)) / CpvAccess(timestep);
-               if (CpvAccess(start_processing_time) != -1)
-                       CpvAccess(last_time_interval) = (CpvAccess(start_processing_time) -
-                                                CpvAccess(init_time)) / CpvAccess(timestep);
+    adjust_timestep(&CpvAccess(timestep), &temp_time_interval,
+        CpvAccess(display_table), 2);
+    CpvAccess(current_time_interval) = (time - CpvAccess(init_time)) / CpvAccess(timestep);
+    if (CpvAccess(start_processing_time) != -1)
+      CpvAccess(last_time_interval) = (CpvAccess(start_processing_time) -
+             CpvAccess(init_time)) / CpvAccess(timestep);
 
 TRACE(CmiPrintf("[%d] adjust_time_interval: current_time_interval=%d\n", 
 CmiMyPe(), CpvAccess(current_time_interval)));
-       }
+  }
 }
 
 
 /***********************************************************************/ 
-/***   This function is called when the program begins to execute to **/
-/***   set up the log files.                                         **/
+/***   This function is called when the program begins to execute to **/
+/***   set up the log files.                **/
 /***********************************************************************/ 
 
-log_init()
+void log_init(void)
 { 
-       int i, j;
-       CpvAccess(timestep) = INITIAL_TIMESTEP;
+  int i, j;
+  CpvAccess(timestep) = INITIAL_TIMESTEP;
 
-       CpvAccess(CtrRecdTraceMsg) = 0;
-       CpvAccess(init_time) = CkTimer();
-       CpvAccess(start_processing_time) = -1;
+  CpvAccess(CtrRecdTraceMsg) = 0;
+  CpvAccess(init_time) = CkTimer();
+  CpvAccess(start_processing_time) = -1;
         for (i=0; i<NUMBER_DISPLAYS; i++)
         for (j=0; j<MAXLOGMSGSIZE; j++)
-               CpvAccess(display_table)[i][j] = 0;
+    CpvAccess(display_table)[i][j] = 0;
 }
 
 
 /***********************************************************************/ 
 /*** This function is called at the very end to dump the buffers into **/
-/*** the log files.                                                  **/
+/*** the log files.                  **/
 /***********************************************************************/ 
 
-close_log()
+void close_log(void)
 {
-       if (CmiMyPe() == 0)
-       {
-               int i, j; 
-               int length;
-               FILE *log_file_desc;
-               char *log_file_name;    /* log file name        */
-
-               /* build log file name from pgm name and pe number */
-               /* flush out the log buffer before closing the log file */
-       
-               length = strlen(CpvAccess(pgm)) + strlen(".pgm") + 1;
-               log_file_name = (char *) CmiAlloc(length);
-               sprintf(log_file_name, "%s.log", CpvAccess(pgm));
-       
-               if((log_file_desc = fopen(log_file_name, "w+")) == NULL)
-                       printf("*** ERROR *** Cannot Create %s",
-                                       log_file_name);
-               fprintf(log_file_desc, "%d %d %d\n", CmiNumPes(),
-                       CpvAccess(timestep), CpvAccess(current_time_interval)+1);
-                       
-
-               for (j=0; j<CpvAccess(current_time_interval)+1; j++)
-                       CpvAccess(display_table)[IDLE_TIME][j] =
-                               (CpvAccess(display_table)[IDLE_TIME][j]*100)/
-                               (CmiNumPes()*CpvAccess(timestep));
-               for (i=0; i<NUMBER_DISPLAYS; i++)
-               {
-                       for (j=0; j<CpvAccess(current_time_interval)+1; j++)
-                               fprintf(log_file_desc, "%d ", 
-                                       CpvAccess(display_table)[i][j]); 
-                       fprintf(log_file_desc, "\n");
-               }
-       }
+  if (CmiMyPe() == 0)
+  {
+    int i, j; 
+    int length;
+    FILE *log_file_desc;
+    char *log_file_name;   /* log file name        */
+
+    /* build log file name from pgm name and pe number */
+    /* flush out the log buffer before closing the log file */
+  
+    length = strlen(CpvAccess(pgm)) + strlen(".pgm") + 1;
+    log_file_name = (char *) CmiAlloc(length);
+    sprintf(log_file_name, "%s.log", CpvAccess(pgm));
+  
+    if((log_file_desc = fopen(log_file_name, "w+")) == NULL)
+      printf("*** ERROR *** Cannot Create %s",
+          log_file_name);
+    fprintf(log_file_desc, "%d %d %d\n", CmiNumPes(),
+      CpvAccess(timestep), CpvAccess(current_time_interval)+1);
+      
+
+    for (j=0; j<CpvAccess(current_time_interval)+1; j++)
+      CpvAccess(display_table)[IDLE_TIME][j] =
+        (CpvAccess(display_table)[IDLE_TIME][j]*100)/
+        (CmiNumPes()*CpvAccess(timestep));
+    for (i=0; i<NUMBER_DISPLAYS; i++)
+    {
+      for (j=0; j<CpvAccess(current_time_interval)+1; j++)
+        fprintf(log_file_desc, "%d ", 
+          CpvAccess(display_table)[i][j]); 
+      fprintf(log_file_desc, "\n");
+    }
+  }
 }
 
-adjust_timestep(timestep, current_time_interval, display_table, index)
+void adjust_timestep(timestep, current_time_interval, display_table, index)
 int *timestep;
 int *current_time_interval;
 int display_table[NUMBER_DISPLAYS][MAXLOGMSGSIZE];
 int index;
 {
-       int i, j, k, l;
+  int i, j, k, l;
 
 TRACE(CmiPrintf("[%d] adjust_timestep: timestep=%d, current_time_interval=%d, index=%d\n",
-               CmiMyPe(), *timestep, *current_time_interval, index));
+    CmiMyPe(), *timestep, *current_time_interval, index));
 
 TRACE(print_idle(*current_time_interval));
 
@@ -219,132 +225,132 @@ TRACE(print_idle(*current_time_interval));
 
         for (i=0; i<NUMBER_DISPLAYS; i++)
         for (j=0,l=0; j<(*current_time_interval+1); j+=index,l++)
-       {
+  {
                 display_table[i][l] = display_table[i][j];
-               for (k=1; k<index; k++)
-               if (j+k<(*current_time_interval)+1)
-                       display_table[i][l] += display_table[i][j+k];
-       }
-
-       l--;
-       /*
-       for (j=0; j<l+1; j++)
-               display_table[IDLE_TIME][j] /= index;   
-       */
+          for (k=1; k<index; k++)
+    if (j+k<(*current_time_interval)+1)
+                   display_table[i][l] += display_table[i][j+k];
+  }
+
+  l--;
+  /*
+  for (j=0; j<l+1; j++)
+    display_table[IDLE_TIME][j] /= index;  
+  */
         *current_time_interval = l;
 
         for (i=0; i<NUMBER_DISPLAYS; i++)
-               for (j=l+1; j<MAXLOGMSGSIZE; j++)
-                       display_table[i][j] = 0;
+          for (j=l+1; j<MAXLOGMSGSIZE; j++)
+      display_table[i][j] = 0;
 
 TRACE(print_idle(*current_time_interval));
 }
 
 
 
-add_log(msg)
+void add_log(msg)
 PERF_MSG *msg;
 {
-       int i, j;
-
-       if ((msg->timestep != 0) && (msg->timestep != CpvAccess(timestep)))
-               if (msg->timestep > CpvAccess(timestep))
-                       adjust_timestep(&CpvAccess(timestep), &CpvAccess(current_time_interval),
-                                       CpvAccess(display_table),
-                                       (msg->timestep/CpvAccess(timestep)));
-               else
-                       adjust_timestep(&(msg->timestep),
-                                       &(msg->current_time_interval),
-                                       msg->display_table,
-                                       (CpvAccess(timestep)/msg->timestep));
-
-       /* flush out the log buffer before closing the log file */
-       for (i=0; i<NUMBER_DISPLAYS; i++)
-               for (j=0; j<CpvAccess(current_time_interval)+1; j++)
-                       CpvAccess(display_table)[i][j] += msg->display_table[i][j];
-       /*
-       for (j=0; j<CpvAccess(current_time_interval)+1; j++)
-               CpvAccess(display_table)[IDLE_TIME][j] /= 2;
-       */
+  int i, j;
+
+  if ((msg->timestep != 0) && (msg->timestep != CpvAccess(timestep)))
+    if (msg->timestep > CpvAccess(timestep))
+      adjust_timestep(&CpvAccess(timestep), &CpvAccess(current_time_interval),
+          CpvAccess(display_table),
+          (msg->timestep/CpvAccess(timestep)));
+    else
+      adjust_timestep(&(msg->timestep),
+          &(msg->current_time_interval),
+          msg->display_table,
+          (CpvAccess(timestep)/msg->timestep));
+
+  /* flush out the log buffer before closing the log file */
+  for (i=0; i<NUMBER_DISPLAYS; i++)
+    for (j=0; j<CpvAccess(current_time_interval)+1; j++)
+      CpvAccess(display_table)[i][j] += msg->display_table[i][j];
+  /*
+  for (j=0; j<CpvAccess(current_time_interval)+1; j++)
+    CpvAccess(display_table)[IDLE_TIME][j] /= 2;
+  */
 
 }
 
 /*************************************************************************/ 
-/** Send out performance message.                                      **/
+/** Send out performance message.          **/
 /*************************************************************************/ 
-SendOutTraceMsg(mype)
+void SendOutTraceMsg(mype)
 int mype;
 {
-       int i, j;
-       PERF_MSG *msg;
-
-       msg = (PERF_MSG *) CkAllocMsg(sizeof(PERF_MSG));
-
-       msg->current_time_interval = CpvAccess(current_time_interval);
-       msg->timestep = CpvAccess(timestep);
-       for (i=0; i<NUMBER_DISPLAYS; i++)
-       {
-       for (j=0; j<CpvAccess(current_time_interval)+1; j++)
-               msg->display_table[i][j] = CpvAccess(display_table)[i][j];      
-       for (j=CpvAccess(current_time_interval)+1; j<MAXLOGMSGSIZE; j++)
-               msg->display_table[i][j] = 0;
-       }
+  int i, j;
+  PERF_MSG *msg;
+
+  msg = (PERF_MSG *) CkAllocMsg(sizeof(PERF_MSG));
+
+  msg->current_time_interval = CpvAccess(current_time_interval);
+  msg->timestep = CpvAccess(timestep);
+  for (i=0; i<NUMBER_DISPLAYS; i++)
+  {
+  for (j=0; j<CpvAccess(current_time_interval)+1; j++)
+    msg->display_table[i][j] = CpvAccess(display_table)[i][j];  
+  for (j=CpvAccess(current_time_interval)+1; j<MAXLOGMSGSIZE; j++)
+    msg->display_table[i][j] = 0;
+  }
 TRACE(CmiPrintf("[%d] Send out perf message to %d\n", 
-               mype, CmiSpanTreeParent(mype)));
+    mype, CmiSpanTreeParent(mype)));
 
-       GeneralSendMsgBranch(CsvAccess(CkEp_Stat_TraceCollectNodes), msg,
-               CmiSpanTreeParent(mype), BocMsg, StatisticBocNum);
+  GeneralSendMsgBranch(CsvAccess(CkEp_Stat_TraceCollectNodes), msg,
+    CmiSpanTreeParent(mype), BocMsg, StatisticBocNum);
 }
 
 
 /*************************************************************************/ 
-/** Adjust log and send out messages if necessary.                     **/
+/** Adjust log and send out messages if necessary.      **/
 /*************************************************************************/ 
-send_log()
+void send_log(void)
 {
-       int mype = CmiMyPe();
-       if (CmiNumSpanTreeChildren(mype) == 0)
-       {
-               CpvAccess(CtrRecdTraceMsg) = 1;
-               if (mype != 0)
-                       SendOutTraceMsg(mype);
-       }
+  int mype = CmiMyPe();
+  if (CmiNumSpanTreeChildren(mype) == 0)
+  {
+    CpvAccess(CtrRecdTraceMsg) = 1;
+    if (mype != 0)
+      SendOutTraceMsg(mype);
+  }
 }
 
 /************************************************************************/ 
-/** Collect performance messages sent from children here.              **/
+/** Collect performance messages sent from children here.    **/
 /************************************************************************/ 
-CollectTraceFromNodes(msg, localdataptr)
+void CollectTraceFromNodes(msg, localdataptr)
 PERF_MSG *msg;
 void  *localdataptr;
 {
-       int mype;
+  int mype;
 
-       CpvAccess(num_childmsgs)++;
-       add_log(msg);
-       mype = CmiMyPe();
+  CpvAccess(num_childmsgs)++;
+  add_log(msg);
+  mype = CmiMyPe();
 
 TRACE(CmiPrintf("[%d] CollectTrace..: num_childmsgs=%d,  span=%d\n",
-               mype, CpvAccess(num_childmsgs), CmiNumSpanTreeChildren(mype)));
-       if (CpvAccess(num_childmsgs) == CmiNumSpanTreeChildren(mype))
-       {
-               CpvAccess(CtrRecdTraceMsg) = 1;
-               if (mype != 0)
-                       SendOutTraceMsg(mype);
+    mype, CpvAccess(num_childmsgs), CmiNumSpanTreeChildren(mype)));
+  if (CpvAccess(num_childmsgs) == CmiNumSpanTreeChildren(mype))
+  {
+    CpvAccess(CtrRecdTraceMsg) = 1;
+    if (mype != 0)
+      SendOutTraceMsg(mype);
 TRACE(CmiPrintf("[%d] RecdStatMsg=%d\n", CmiMyPe(), CpvAccess(RecdStatMsg)));
-               if (CpvAccess(RecdStatMsg)) ExitNode();         
-       }  
+    if (CpvAccess(RecdStatMsg)) ExitNode();   
+  }  
 }
 
 /***********************************************************************/ 
 /***  This function is used to determine the name of the program.     **/
 /***********************************************************************/ 
 
-program_name(s, m)
+void program_name(s, m)
 char *s, *m;
 {
-       CpvAccess(pgm) = (char *) malloc(strlen(s)+1);
-       strcpy(CpvAccess(pgm), s);
+  CpvAccess(pgm) = (char *) malloc(strlen(s)+1);
+  strcpy(CpvAccess(pgm), s);
 }
 
 
@@ -352,87 +358,87 @@ char *s, *m;
 
 
 /*************************************************************************/
-/** Update the display for this message processing/creation.           **/
+/** Update the display for this message processing/creation.      **/
 /*************************************************************************/
-update_display(index, last_interval, current_interval)
+void update_display(index, last_interval, current_interval)
 int index;
 int last_interval, current_interval;
 {
-       int i;
+  int i;
 
-       /*
-       for (i=last_interval; i<=current_interval; i++)
-               (CpvAccess(display_table)[index][i])++;
-       */
-       CpvAccess(display_table)[index][last_interval]++;
+  /*
+  for (i=last_interval; i<=current_interval; i++)
+    (CpvAccess(display_table)[index][i])++;
+  */
+  CpvAccess(display_table)[index][last_interval]++;
 }
 
 
 
 /*************************************************************************/
-/** We compute the busy period in this function.                       **/
+/** We compute the busy period in this function.      **/
 /*************************************************************************/
-compute_busy(begin, end, last_interval, current_interval)
+void compute_busy(begin, end, last_interval, current_interval)
 int begin, end;
 int last_interval, current_interval;
 {
-       int i;
-       int border;
+  int i;
+  int border;
 
 TRACE(CmiPrintf("[%d] compute_busy: begin=%d, end=%d, last_interval=%d, current_interval=%d\n",
-               CmiMyPe(), begin, end, last_interval, current_interval));
-       if (begin == -1) return;
-
-
-       if (current_interval > last_interval)
-       {
-               for (i=last_interval; i<current_interval; i++)
-               {
-                       border = CpvAccess(timestep)*(i+1) + CpvAccess(init_time); 
-                       CpvAccess(display_table)[IDLE_TIME][i] += border - begin;
-                                /* ((border - begin)*100)/CpvAccess(timestep); */
-                       begin = border;
-               }
-               CpvAccess(display_table)[IDLE_TIME][current_interval] +=
-                                end - border;
-                                /* ((end - border)*100)/CpvAccess(timestep); */
-       }
-       else
-               CpvAccess(display_table)[IDLE_TIME][current_interval] +=
-                        end - begin;
-                        /* ((end - begin)*100)/CpvAccess(timestep); */
+    CmiMyPe(), begin, end, last_interval, current_interval));
+  if (begin == -1) return;
+
+
+  if (current_interval > last_interval)
+  {
+    for (i=last_interval; i<current_interval; i++)
+    {
+      border = CpvAccess(timestep)*(i+1) + CpvAccess(init_time); 
+      CpvAccess(display_table)[IDLE_TIME][i] += border - begin;
+         /* ((border - begin)*100)/CpvAccess(timestep); */
+      begin = border;
+    }
+    CpvAccess(display_table)[IDLE_TIME][current_interval] +=
+         end - border;
+         /* ((end - border)*100)/CpvAccess(timestep); */
+  }
+  else
+    CpvAccess(display_table)[IDLE_TIME][current_interval] +=
+       end - begin;
+       /* ((end - begin)*100)/CpvAccess(timestep); */
 }
 
 
 
 /*************************************************************************/
-/** This function is used to process creation message types.           **/
+/** This function is used to process creation message types.    **/
 /*************************************************************************/
 
-get_creation_display_index(msg_type) 
+int get_creation_display_index(msg_type) 
 int msg_type; 
 {
-       int display_index;
-
-       /*****************************************************************/
-       /** Get the proper display table.                               **/
-       /******************************************************************/
-       switch (msg_type) 
-       {
-               case NewChareMsg:
-                       display_index = CREATE_NEWCHARE;
-                       break;
-               case ForChareMsg:
-                       display_index = CREATE_FORCHARE;
-                       break;
-               case BocMsg:
-                       display_index = CREATE_FORBOC;
-                       break;
-               default:
-                       display_index = -1;
-                       break;
-       }
-       return display_index;
+  int display_index;
+
+      /*****************************************************************/
+  /** Get the proper display table.        **/
+      /******************************************************************/
+  switch (msg_type) 
+  {
+    case NewChareMsg:
+      display_index = CREATE_NEWCHARE;
+      break;
+    case ForChareMsg:
+      display_index = CREATE_FORCHARE;
+      break;
+    case BocMsg:
+      display_index = CREATE_FORBOC;
+      break;
+    default:
+      display_index = -1;
+      break;
+  }
+  return display_index;
 }
 
 
@@ -440,56 +446,56 @@ int msg_type;
 /*************************************************************************/
 /*************************************************************************/
 
-get_processing_display_index(msg_type)
+int get_processing_display_index(msg_type)
 int msg_type;
 {
-       int display_index;
-
-       /*****************************************************************/
-       /** Get the proper display table.                               **/
-       /******************************************************************/
-       switch (msg_type) 
-       {
-               case NewChareMsg:
-                       display_index = PROCESS_NEWCHARE;
-                       break;
-               case ForChareMsg:
-                       display_index = PROCESS_FORCHARE;
-                       break;
-               case BocMsg:
-                       display_index = PROCESS_FORBOC;
-                       break;
-               default:
-                       display_index = -1;
-                       break;
-       }
-       return display_index;
+  int display_index;
+
+      /*****************************************************************/
+  /** Get the proper display table.        **/
+      /******************************************************************/
+  switch (msg_type) 
+  {
+    case NewChareMsg:
+      display_index = PROCESS_NEWCHARE;
+      break;
+    case ForChareMsg:
+      display_index = PROCESS_FORCHARE;
+      break;
+    case BocMsg:
+      display_index = PROCESS_FORBOC;
+      break;
+    default:
+      display_index = -1;
+      break;
+  }
+  return display_index;
 }
 
 
 
 
-print_idle(X)
+void print_idle(X)
 int X;
 {
-       int j;
-       char *str, *string;
-
-       str = (char *) malloc(100);
-       string = (char *) malloc(1000);
-
-       CmiPrintf("[%d] print_idle: X=%d, current_time_interval=%d\n",
-                        CmiMyPe(), X, CpvAccess(current_time_interval));
-       sprintf(string, "");
-       for (j=0; j<X+1; j++)
-       {
-               sprintf(str, "%d ", CpvAccess(display_table)[0][j]);
-               strcat(string, str);
-       }
-       CmiPrintf("[%d] print_idle: %s \n", CmiMyPe(), string);
-       
-       free(str);
-       free(string);
+  int j;
+  char *str, *string;
+
+  str = (char *) malloc(100);
+  string = (char *) malloc(1000);
+
+  CmiPrintf("[%d] print_idle: X=%d, current_time_interval=%d\n",
+       CmiMyPe(), X, CpvAccess(current_time_interval));
+  sprintf(string, "");
+  for (j=0; j<X+1; j++)
+  {
+    sprintf(str, "%d ", CpvAccess(display_table)[0][j]);
+    strcat(string, str);
+  }
+  CmiPrintf("[%d] print_idle: %s \n", CmiMyPe(), string);
+  
+  free(str);
+  free(string);
 }
 
 
index 05384402b9f33b2c21ffe6b06f5139dc13fdb05e..a8baa1a0bbb802a831dc571fe9a93cdb401e6c05 100644 (file)
@@ -37,7 +37,7 @@ int *event, *dest,  *pe;
 }
 
 
-write_out_debug_line(fp, type, mtype, entry, time, event, pe)
+void write_out_debug_line(fp, type, mtype, entry, time, event, pe)
 FILE *fp;
 int type, mtype, entry;
 unsigned int time;
@@ -86,28 +86,23 @@ int *event, *dest, *pe;
                        if (replay && *type==CREATION && *mtype==NewChareMsg) 
                                value = fscanf(fp, "%d", dest);
                        return value;
-               break;
 
                case ENQUEUE:
                case DEQUEUE:
                return fscanf(fp, "%d %u %d %d", mtype, time, event, pe);
-               break;
        
                case INSERT:
                case FIND:
                case DELETE:
                return fscanf(fp, "%d %d %u %d", mtype, entry, time, pe);
-               break;
 
                case BEGIN_INTERRUPT:
                case END_INTERRUPT:
                return fscanf(fp, "%u %d %d", time, event, pe);
-               break;
        
                case BEGIN_COMPUTATION:
                case END_COMPUTATION:
                return fscanf(fp, "%u", &time);
-               break;
        
                default:
                printf("***ERROR*** Wierd Event %d.\n", *type);
@@ -115,7 +110,7 @@ int *event, *dest, *pe;
     }
 }
 
-write_out_projections_line(fp, type, mtype, entry, time, event, pe)
+void write_out_projections_line(fp, type, mtype, entry, time, event, pe)
 FILE *fp;
 int type, mtype, entry;
 unsigned int time;
index ace575cf0269f3043bf3005a42f9436bba71fec8..246ca083a5320cab7ff1ee9aebc9e390187d65f6 100644 (file)
@@ -707,7 +707,7 @@ CthThread t;
  * 
  ***************************************************************************/
 
-CsdInit(argv)
+void CsdInit(argv)
   char **argv;
 {
   void *CqsCreate();
@@ -852,7 +852,7 @@ char **msgs;
  *
  *****************************************************************************/
 
-ConverseCommonInit(char *argv)
+void ConverseCommonInit(char **argv)
 {
   CstatsInit(argv);
   CcdModuleInit(argv);
@@ -863,7 +863,7 @@ ConverseCommonInit(char *argv)
   CthSchedInit();
 }
 
-ConverseCommonExit()
+void ConverseCommonExit(void)
 {
   close_log();
 }
index a12ba8a829ffcc53b375696a719356da1098bc8b..bd2fd038ac36a80fbc0da2b72dbdc075c910aba4 100644 (file)
@@ -79,6 +79,7 @@ void *CpmEnqueue1(CpmDestinationEnq ctrl, int len, void *msg)
   memcpy(env+3, ctrl->prioptr, prioints*sizeof(int));
   CmiSetHandler(msg, CpvAccess(CpmEnqueue2_Index));
   CpmLSend(ctrl->pe, len, msg);
+  return (void *) 0;
 }
 
 CpmDestination CpmEnqueue(int pe, int qs, int priobits, int *prioptr)
@@ -141,6 +142,7 @@ void *CpmEnqueueFIFO1(CpmDestinationSend ctrl, int len, void *msg)
   env[0] = CmiGetHandler(msg);
   CmiSetHandler(msg, CpvAccess(CpmEnqueueFIFO2_Index));
   CpmLSend(ctrl->pe, len, msg);
+  return (void *) 0;
 }
 
 CpvStaticDeclare(DestinationSend, ctrlFIFO);
@@ -176,6 +178,7 @@ void *CpmEnqueueLIFO1(CpmDestinationSend ctrl, int len, void *msg)
   env[0] = CmiGetHandler(msg);
   CmiSetHandler(msg, CpvAccess(CpmEnqueueLIFO2_Index));
   CpmLSend(ctrl->pe, len, msg);
+  return (void *) 0;
 }
 
 CpvStaticDeclare(DestinationSend, ctrlLIFO);
index e688ca35793d968a12a8a044ff079987ee410754..d95e6e0ada97580008eb91f720659f06de9842b7 100644 (file)
@@ -131,6 +131,7 @@ deleted:
   key->magic = FKEY_MAGIC;
   key->next = keys_inactive;
   keys_inactive = key;
+  return 0;
 }
 
 int Cpthread_setspecific(Cpthread_key_t key, void *val)
@@ -373,6 +374,7 @@ int Cpthread_once(Cpthread_once_t *once, void (*fn)(void))
   if (once->flag[rank]) return 0;
   once->flag[rank] = 1;
   fn();
+  return 1;
 }
 
 /******************************************************************************
index f5322141696d79718bc22bfbb6960eec5d9b75ca..bf76b3e6269aecf725179606c71eacc58644b1da 100644 (file)
@@ -103,7 +103,7 @@ void FIFO_DeQueue(queue, element)
   } else *element = 0;
 }
 
-FIFO_Destroy(queue)
+void FIFO_Destroy(queue)
      FIFO_QUEUE *queue;
 {
   if (!FIFO_Empty(queue)) {
index 357037af0391d0025044fbde897ce933f5cae001..7a64d101d7ec1425445945fa00d51bade3130790 100644 (file)
@@ -17,7 +17,7 @@ typedef struct CfutureValue_s
 }
 *CfutureValue;
 
-#define field_offset(t, f) ((int)(((t)0)->f))
+#define field_offset(t, f) ((size_t)(((t)0)->f))
 #define void_to_value(v) ((CfutureValue)(((char*)v)-field_offset(CfutureValue,rest)))
 
 CpvDeclare(int, CfutureStoreIndex);
index f5daa583b1adcb364acf97be949a58e25e139107..1e82a6b2bc73dc3a644bd860e21904f7b4537988 100644 (file)
@@ -779,8 +779,8 @@ static mchunkptr malloc_from_sys(nb) size_t nb;
     return 0;
   sbrked_mem += sbrk_size;
 
-  if (((int)cp) & MALLOC_ALIGN_MASK) {
-    offs = ((int)cp) & MALLOC_ALIGN_MASK;
+  if (((size_t)cp) & MALLOC_ALIGN_MASK) {
+    offs = ((size_t)cp) & MALLOC_ALIGN_MASK;
     cp += MALLOC_MIN_OVERHEAD - offs;
     sbrk_size -= MALLOC_MIN_OVERHEAD;
     sbrk(- offs);
index 3ea225332589bbeb8a758840b4bec594ca09dc6c..537f6cc3d8f4f97a466420abb6ba5f1f30f776fc 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 1.4  1996-04-24 22:44:16  jyelon
+ * Revision 1.5  1997-10-29 23:53:08  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 1.4  1996/04/24 22:44:16  jyelon
  * *** empty log message ***
  *
  * Revision 1.3  1995/10/12 18:14:52  jyelon
@@ -43,7 +46,7 @@
 static char ident[] = "@(#)$Header$";
 
 #include <converse.h>
-#define INTBITS (sizeof(int)*8)
+#define INTBITS ((unsigned int) (sizeof(int)*8))
 
 typedef struct prio
 {
@@ -317,7 +320,7 @@ Queue CqsCreate()
   Queue q = (Queue)CmiAlloc(sizeof(struct Queue));
   q->length = 0;
   q->maxlen = 0;
-  CqsDeqInit(&(q->zeroprio), 100);
+  CqsDeqInit(&(q->zeroprio));
   CqsPrioqInit(&(q->negprioq));
   CqsPrioqInit(&(q->posprioq));
   return q;
index b16d73808cce997baf43c2f8a7c506759e1e1828..09d0d3364b1075ef46e8a1b04142c5d7f75d63a9 100644 (file)
@@ -229,11 +229,13 @@ static void *CthAbortHelp(qt_t *sp, CthThread old, void *null)
 {
   if (old->data) free(old->data);
   free(old);
+  return (void *) 0;
 }
 
 static void *CthBlockHelp(qt_t *sp, CthThread old, void *null)
 {
   old->stackp = sp;
+  return (void *) 0;
 }
 
 void CthResume(t)
@@ -271,7 +273,7 @@ CthVoidFn fn; void *arg; int size;
   result = (CthThread)malloc(sizeof(struct CthThreadStruct)+size);
   if (result==0) { CmiError("Out of memory."); exit(1); }
   stack = ((char*)result)+sizeof(struct CthThreadStruct);
-  stack = (char *)QT_STKROUNDUP(((int)stack));
+  stack = (char *)QT_STKROUNDUP(((size_t)stack));
   CthThreadInit(result);
   result->stackp = QT_SP(stack, size - QT_STKALIGN);
   result->stackp = 
index 0cc7dbe035c7d03595ce621078ca45e589070baf..58ce6d432799d1d7e6884d1b7d63c1cfc77321d3 100644 (file)
  * REVISION HISTORY:
  *
  * $Log$
- * Revision 2.2  1996-08-01 21:03:16  jyelon
+ * Revision 2.3  1997-10-29 23:53:11  milind
+ * Fixed CthInitialize bug on uth machines.
+ *
+ * Revision 2.2  1996/08/01 21:03:16  jyelon
  * Updated everything to bison and flex.
  *
  * Revision 2.1  1995/06/15 20:27:11  jyelon
@@ -54,6 +57,11 @@ extern void InitMapHead();
 char outhfilename[FILENAMELENGTH];
 int InPass1=0;
 
+void CreateTempFile(void);
+void CopyFile(void);
+void SkipInterface(void);
+void RealDummy();
+
 void ParseCommandLine(argc,argv)
 int argc;
 char *argv[];
@@ -131,7 +139,7 @@ char *argv[];
 #define IsModule 1
 #define IsInterface 2
 
-CreateTempFile()
+void CreateTempFile(void)
 { char ch;
   int filechar;
 
@@ -170,7 +178,7 @@ char ch;
   else         { if (IsToken("nterface")) return(IsInterface); else return(0); }
 }
 
-CopyFile()
+void CopyFile(void)
 { char ch;
   int index=0;
   int filechar;
@@ -192,7 +200,7 @@ CopyFile()
        { putc(ch,outh2); ch=filechar=getc(yyin); }
 }
 
-SkipInterface()
+void SkipInterface(void)
 { int count;
   char ch;
   int filechar;
@@ -210,6 +218,6 @@ SkipInterface()
 
 #undef free
 
-RealDummy(a)
+void RealDummy(a)
 {}