Changeset 7775


Ignore:
Timestamp:
02/06/19 15:33:00 (2 months ago)
Author:
alexander
Message:

Changed StartThread?(), StartThreadWithArg?(), WaitThread?() and KillThread?() to use thread ids specified by ew_thread_t

Location:
trunk
Files:
90 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/earthworm_complex_funcs.h

    r7512 r7775  
    111111 ******************************************************************************/ 
    112112 
    113 int WaitThread( unsigned int * ); 
    114 int KillThread( unsigned int ); 
     113int WaitThread( ew_thread_t * ); 
     114int KillThread( ew_thread_t ); 
    115115int KillSelfThread( void ); 
    116 int StartThread( thr_ret (*fun)( void * ), unsigned int, unsigned int * ); 
    117 int StartThreadWithArg( thr_ret (*fun)( void * ), void *, unsigned int, unsigned int * ); 
     116int StartThread( thr_ret (*fun)( void * ), unsigned int, ew_thread_t * ); 
     117int StartThreadWithArg( thr_ret (*fun)( void * ), void *, unsigned int, ew_thread_t * ); 
    118118 
    119119#endif /* EARTHWORM_COMPLEX_FUNCS_H */ 
  • trunk/include/startstop_unix_generic.h

    r7075 r7775  
    112112void *Interactive( void * );  /* Interactive thread */ 
    113113int  GetConfig(); /* Reads configuration file */ 
    114 void Threads( void*(void *), thread_t * ); 
     114void Threads( void*(void *), ew_thread_t * ); 
    115115 
    116116#ifdef _USE_POSIX_SIGNALS 
  • trunk/src/archiving/cont_trig/cont_trig.c

    r7232 r7775  
    8181//  char                inBuf[MAXLINELEN];      /* Pointer to the input message */ 
    8282                                        /*   buffer.                    */ 
    83   unsigned int  tidSubnet;      /* id of Subnet thread                  */ 
     83  ew_thread_t   tidSubnet;      /* id of Subnet thread                  */ 
    8484  int           result;         /* Result from function calls.          */ 
    8585//  long                sizeMsg;        /* Size of retrieved message.           */ 
  • trunk/src/archiving/ewmseedarchiver/ewmseedarchiver.c

    r7499 r7775  
    4949/* Thread things */ 
    5050#define THREAD_STACK 8192 
    51 static unsigned tidStacker;          /* Thread moving messages from transport to queue */ 
     51static ew_thread_t tidStacker;          /* Thread moving messages from transport to queue */ 
    5252 
    5353#define MSGSTK_OFF    0              /* MessageStacker has not been started      */ 
  • trunk/src/archiving/mole/ew2moledb/ew2moledb.c

    r7107 r7775  
    125125 
    126126int main( int argc, char **argv ) { 
    127     time_t       now;                    /* current time, used for timing heartbeats */ 
    128     pid_t        MyPid;                  /* Our own pid, sent with heartbeat for restart purposes */ 
    129     time_t       MyLastBeat;             /* time of last local (into Earthworm) hearbeat */ 
    130     unsigned     tidStacker[MAX_NUM_OF_RINGS];   /* Thread moving messages from transport to queue */ 
    131     unsigned     tidDBPopulate;          /* Thread read message from queue and populate DB */ 
    132     unsigned     tidQueueDumpFile;       /* Thread read message from queue and populate DB */ 
    133     int          ret_dq;                 /* stores errors from dumpqueue() and undumpqueue() */ 
    134     int          cur_NumOfElements = 0;  /* Current value of number of elements in OutQueue */ 
    135     const int    wait_time_thr_tot   = 5000;  /* total of waiting time for joining all threads */ 
    136     const int    wait_time_thr_slice = wait_time_thr_tot / 10;   /* slice of waiting time for joining all threads */ 
    137     int          wait_time_thr_count = 0;     /* counter of waiting time for joining all threads */ 
    138     char         errText[STR_LEN_ERRTEXT];  /* string for log/error/heartbeat messages           */ 
    139     char         *configfile;       /* pointer to configuration file name argv[1] */  
    140     MYSQL        *test_mysql_connection = NULL; 
     127    time_t              now;                     /* current time, used for timing heartbeats */ 
     128    pid_t               MyPid;                   /* Our own pid, sent with heartbeat for restart purposes */ 
     129    time_t              MyLastBeat;             /* time of last local (into Earthworm) hearbeat */ 
     130    ew_thread_t     tidStacker[MAX_NUM_OF_RINGS];   /* Thread moving messages from transport to queue */ 
     131    ew_thread_t     tidDBPopulate;          /* Thread read message from queue and populate DB */ 
     132    ew_thread_t     tidQueueDumpFile;       /* Thread read message from queue and populate DB */ 
     133    int                 ret_dq;                 /* stores errors from dumpqueue() and undumpqueue() */ 
     134    int                 cur_NumOfElements = 0;  /* Current value of number of elements in OutQueue */ 
     135    const int           wait_time_thr_tot   = 5000;  /* total of waiting time for joining all threads */ 
     136    const int           wait_time_thr_slice = wait_time_thr_tot / 10;   /* slice of waiting time for joining all threads */ 
     137    int                 wait_time_thr_count = 0;     /* counter of waiting time for joining all threads */ 
     138    char                errText[STR_LEN_ERRTEXT];  /* string for log/error/heartbeat messages           */ 
     139    char                *configfile;       /* pointer to configuration file name argv[1] */  
     140    MYSQL               *test_mysql_connection = NULL; 
    141141 
    142142    int          r = 0; 
  • trunk/src/archiving/nq2wws/nq2wws.c

    r7606 r7775  
    6060***************/ 
    6161#define THREAD_STACK 8192 
    62 static unsigned TidSender;           /* SocketSender thread id */ 
    63 static unsigned TidListener;         /* Thread listening for client heartbeats */ 
    64 static unsigned TidStacker;          /* Thread moving messages from transport */ 
     62static ew_thread_t TidSender;           /* SocketSender thread id */ 
     63static ew_thread_t TidListener;         /* Thread listening for client heartbeats */ 
     64static ew_thread_t TidStacker;          /* Thread moving messages from transport */ 
    6565                                                                         /*   to queue */ 
    6666 
  • trunk/src/archiving/nq2wws/nq2wws_ack.c

    r7606 r7775  
    5656***************/ 
    5757#define THREAD_STACK 8192 
    58 static unsigned TidSender;           /* SocketSender thread id */ 
    59 static unsigned TidListener;         /* Thread listening for client heartbeats */ 
    60 static unsigned TidStacker;          /* Thread moving messages from transport */ 
     58static ew_thread_t TidSender;           /* SocketSender thread id */ 
     59static ew_thread_t TidListener;         /* Thread listening for client heartbeats */ 
     60static ew_thread_t TidStacker;          /* Thread moving messages from transport */ 
    6161                                                                         /*   to queue */ 
    6262 
  • trunk/src/archiving/nq2wws_ack/nq2wws_ack.c

    r7606 r7775  
    6161 *********************/ 
    6262#define THREAD_STACK 8192 
    63 static unsigned TidSocketSend;       /* SocketSender thread id                */ 
    64 static unsigned TidSocketRecv;       /* SocketRecv thread id                  */ 
    65 static unsigned TidStacker;          /* Thread moving messages from transport */ 
     63static ew_thread_t TidSocketSend;       /* SocketSender thread id                */ 
     64static ew_thread_t TidSocketRecv;       /* SocketRecv thread id                  */ 
     65static ew_thread_t TidStacker;          /* Thread moving messages from transport */ 
    6666                                     /*   to queue                            */ 
    6767/* Thread flags 
  • trunk/src/archiving/trig2disk/trig2disk.c

    r7683 r7775  
    239239***************/ 
    240240#define THREAD_STACK 8192 
    241 static unsigned tidSnipper;      /* Message processing thread id */ 
    242 static unsigned tidStacker;      /* Thread moving messages from transport * 
     241static ew_thread_t tidSnipper;      /* Message processing thread id */ 
     242static ew_thread_t tidStacker;      /* Thread moving messages from transport * 
    243243                                  *   to queue */ 
    244244static  int MessageStackerStatus=0;     /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/archiving/wave_serverV/wave_serverV.c

    r7606 r7775  
    568568**********************/ 
    569569#define THREAD_STACK  8096 
    570 static unsigned int *  tidSockSrv;       /* id of socket-serving threads */ 
    571 static unsigned int   tidServerMgr;      /* id of dispatcher of socket-serving threads */ 
     570static ew_thread_t *  tidSockSrv;       /* id of socket-serving threads */ 
     571static ew_thread_t   tidServerMgr;      /* id of dispatcher of socket-serving threads */ 
    572572ServerThreadInfoStruct * ServerThreadInfo; 
    573573ServerThreadInfoStruct * ServerThreadInfoPrevious; 
     
    581581thr_ret MessageStacker( void * ); 
    582582int     MessageStackerStatus;           /* as above, but for message stacking thread */ 
    583 static unsigned int   tidStacker; 
     583static ew_thread_t   tidStacker; 
    584584static int     InputQueueLen;   /* max messages in input buffer */ 
    585585QUEUE OutQueue;                 /* from queue.h, queue.c; sets up linked */ 
     
    591591************************/ 
    592592thr_ret IndexMgr( void *); 
    593 static unsigned int tidIndexMgr; 
     593static ew_thread_t tidIndexMgr; 
    594594static mutex_t IndexTerminationMutex; 
    595595int terminate=0;   /* Changed to global to server threads: PNL 6/20/00 */ 
     
    15931593     in the config file, and meta-initialize any data neccessary. 
    15941594  ******************************************************************/ 
    1595   tidSockSrv=(unsigned int *) malloc(MaxServerThreads * sizeof(int)); 
     1595  tidSockSrv=(ew_thread_t *) malloc(MaxServerThreads * sizeof(ew_thread_t)); 
    15961596 
    15971597  /*ActiveSocket=(SOCKET *) malloc(MaxServerThreads * sizeof(int));*/ 
  • trunk/src/data_exchange/ew2file/ew2file.c

    r7123 r7775  
    110110***************/ 
    111111#define THREAD_STACK 8192 
    112 static unsigned tidDup;              /* Dup thread id */ 
    113 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     112static ew_thread_t tidDup;              /* Dup thread id */ 
     113static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    114114                                     /*   to queue */ 
    115115 
  • trunk/src/data_exchange/ewexport2ringserver/src/ewexport2ringserver.c

    r7464 r7775  
    2323#ifndef _WIN32          /* if not Windows build then   */ 
    2424#include <pthread.h>    /* use Unix threads            */ 
     25#include "earthworm.h"  /* include this anyway         */ 
    2526#define thr_ret void*   /* thread-function return type */ 
    2627#else                   /* if Windows build then       */ 
     
    112113volatile int Sd;                     /* Socket descriptor                                */ 
    113114char     *MsgBuf;                    /* incoming message buffer; used by receiver thread */ 
    114 pthread_t TidMsgRcv = 0;             /* thread id. was type thread_t on Solaris!         */ 
     115ew_thread_t TidMsgRcv = 0;             /* thread id. was type thread_t on Solaris!         */ 
    115116 
    116117MSG_LOGO      heartlogo; 
  • trunk/src/data_exchange/export/export.c

    r7691 r7775  
    147147#define THREAD_STACK 8192 
    148148#endif 
    149 static unsigned TidSender;           /* SocketSender thread id */ 
    150 static unsigned TidListener;         /* Thread listening for client heartbeats */ 
    151 static unsigned TidStacker;          /* Thread moving messages from transport */ 
     149static ew_thread_t TidSender;           /* SocketSender thread id */ 
     150static ew_thread_t TidListener;         /* Thread listening for client heartbeats */ 
     151static ew_thread_t TidStacker;          /* Thread moving messages from transport */ 
    152152/*   to queue */ 
    153153 
  • trunk/src/data_exchange/export/export_ack.c

    r7691 r7775  
    163163 *********************/ 
    164164#define THREAD_STACK 8192 
    165 static unsigned TidSocketSend;       /* SocketSender thread id                */ 
    166 static unsigned TidSocketRecv;       /* SocketRecv thread id                  */ 
    167 static unsigned TidStacker;          /* Thread moving messages from transport */ 
     165static ew_thread_t TidSocketSend;       /* SocketSender thread id                */ 
     166static ew_thread_t TidSocketRecv;       /* SocketRecv thread id                  */ 
     167static ew_thread_t TidStacker;          /* Thread moving messages from transport */ 
    168168                                     /*   to queue                            */ 
    169169/* Thread flags 
  • trunk/src/data_exchange/export/export_actv.c

    r7606 r7775  
    5252 ***************/ 
    5353#define THREAD_STACK 8192 
    54 static unsigned tidSender;           /* SocketSender thread id */ 
    55 static unsigned tidListener;         /* Thread listening for client heartbeats */ 
    56 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     54static ew_thread_t tidSender;           /* SocketSender thread id */ 
     55static ew_thread_t tidListener;         /* Thread listening for client heartbeats */ 
     56static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    5757                                     /*   to queue */ 
    5858volatile int SocketSenderStatus=0;   /* 0=> SocketSender thread ok.   <0 => dead */ 
  • trunk/src/data_exchange/export/export_scn_pri.c

    r7606 r7775  
    8484 ***************/ 
    8585#define THREAD_STACK 8192 
    86 static unsigned tidSender;           /* SocketSender thread id */ 
    87 static unsigned tidListener;         /* Thread listening for client heartbeats */ 
    88 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     86static ew_thread_t tidSender;           /* SocketSender thread id */ 
     87static ew_thread_t tidListener;         /* Thread listening for client heartbeats */ 
     88static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    8989                                     /*   to queue */ 
    9090 
  • trunk/src/data_exchange/getfile_ew/getfile_ew.c

    r7606 r7775  
    7070****************/ 
    7171#define THREAD_STACK 8192 
    72 static unsigned tidHeartBeater;    /* Heart Beat thread id */ 
     72static ew_thread_t tidHeartBeater;    /* Heart Beat thread id */ 
    7373int HeartBeaterStatus = 0;         /* 0=> thread ok. <0 => dead */ 
    7474 
  • trunk/src/data_exchange/import_generic/import_ack.c

    r7606 r7775  
    189189volatile SOCKET Sd;                  /* Socket descriptor                                */ 
    190190char     *MsgBuf;                    /* incoming message buffer; used by receiver thread */ 
    191 unsigned  TidMsgRcv;                 /* thread id. was type thread_t on Solaris!         */ 
     191ew_thread_t  TidMsgRcv;                 /* thread id. was type thread_t on Solaris!         */ 
    192192 
    193193/* Things to look up in the earthworm.h tables with getutil.c functions 
  • trunk/src/data_exchange/import_generic/import_generic.c

    r7606 r7775  
    170170volatile SOCKET Sd;             /* Socket descriptor                                */ 
    171171char     *MsgBuf;               /* incoming message buffer; used by receiver thread */ 
    172 unsigned TidSocketHeart;       /* thread id. was type thread_t on Solaris! */ 
    173 unsigned  TidMsgRcv;            /* thread id. was type thread_t on Solaris! */ 
     172ew_thread_t TidSocketHeart;       /* thread id. was type thread_t on Solaris! */ 
     173ew_thread_t  TidMsgRcv;            /* thread id. was type thread_t on Solaris! */ 
    174174 
    175175/* Things to look up in the earthworm.h tables with getutil.c functions 
  • trunk/src/data_exchange/import_pasv/import_gen_pasv.c

    r7606 r7775  
    145145char        *Argv0;                   /* pointer to executable name                      */ 
    146146char        *MsgBuf;                  /* incoming msg buffer; used by receiver thread    */ 
    147 unsigned     TidHeart;                /* thread id. was type thread_t on Solaris!        */ 
    148 unsigned     TidMsgRcv;               /* thread id. was type thread_t on Solaris!        */ 
     147ew_thread_t     TidHeart;                /* thread id. was type thread_t on Solaris!        */ 
     148ew_thread_t     TidMsgRcv;               /* thread id. was type thread_t on Solaris!        */ 
    149149SOCKET       PassiveSocket;           /* Passive Socket descriptor (receiver - import)   */ 
    150150SOCKET       ActiveSocket;            /* Active Socket descriptor (sender - export)      */ 
  • trunk/src/data_exchange/liss/ew2liss.c

    r7606 r7775  
    2727  time_t  timeNow;                   /* current time                  */  
    2828  time_t  timeLastBeat;              /* time last heartbeat was sent  */ 
    29   unsigned  tidProcess;            /* Processor thread id           */ 
    30   unsigned  tidServer;             /* Server thread id              */ 
     29  ew_thread_t  tidProcess;            /* Processor thread id           */ 
     30  ew_thread_t  tidServer;             /* Server thread id              */ 
    3131  char *inBuf;                     /* Pointer to the input message buffer. */ 
    3232  int inBufLen;                    /* Size of input message buffer  */ 
  • trunk/src/data_exchange/liss2ew_scnl/liss2ew_scnl.h

    r2192 r7775  
    170170        dcptype     dcp;                  /* Steim decompression structure     */ 
    171171        CTCPSocket *pSocket; 
    172         unsigned int thread_id; 
     172        ew_thread_t thread_id; 
    173173        int                     thread_index; 
    174174} LISSConnection; 
  • trunk/src/data_exchange/pickwasher/pickwasher.c

    r7475 r7775  
    6464 ***************/ 
    6565#define THREAD_STACK 8192 
    66 static unsigned tidWash;             /* Wash thread id */ 
    67 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     66static ew_thread_t tidWash;             /* Wash thread id */ 
     67static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    6868                                     /* to queue */ 
    6969#define MSGSTK_OFF    0              /* MessageStacker has not been started      */ 
  • trunk/src/data_exchange/ringdup/ringdup.c

    r7475 r7775  
    144144 ***************/ 
    145145#define THREAD_STACK 8192 
    146 static unsigned tidDup;              /* Dup thread id */ 
    147 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     146static ew_thread_t tidDup;              /* Dup thread id */ 
     147static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    148148                                     /*   to queue */ 
    149149 
  • trunk/src/data_exchange/ringtocoaxII/ringtocoaxII.c

    r2713 r7775  
    6363 ***************/ 
    6464#define THREAD_STACK 8192 
    65 static unsigned tidSender;            /* Sender thread id */ 
    66 static unsigned tidStacker;           /* Thread moving messages from transport */ 
    67 static unsigned tidAdaptive;          /* Thread controlling output rate        */ 
     65static ew_thread_t tidSender;            /* Sender thread id */ 
     66static ew_thread_t tidStacker;           /* Thread moving messages from transport */ 
     67static ew_thread_t tidAdaptive;          /* Thread controlling output rate        */ 
    6868 
    6969                                     /* to queue */ 
  • trunk/src/data_exchange/sendfileII/sendfilemt.c

    r4357 r7775  
    9494   for ( i = 0; i < nSrv; i++ ) 
    9595   { 
    96       int rc = StartThreadWithArg( ThreadFunction, (void *)i, 0, 
    97                                   &srv[i].threadId ); 
     96      int rc = StartThreadWithArg( ThreadFunction, (void *)i, 
     97                                          0, &srv[i].threadId ); 
    9898      if ( rc == -1 ) 
    9999      { 
  • trunk/src/data_exchange/sendfileII/sendfilemt.h

    r4357 r7775  
    99typedef struct 
    1010{ 
    11    char     tag[13];           // Tag to appear in log file 
    12    char     ip[20];            // IP address of system to receive msg's 
    13    int      port;              // Well-known port number 
    14    char     outDir[80];        // Directory containing files to be sent 
    15    unsigned threadId; 
    16    int      threadAlive;       // 1 if alive; 0 if dead 
     11   char         tag[13];           // Tag to appear in log file 
     12   char         ip[20];            // IP address of system to receive msg's 
     13   int          port;              // Well-known port number 
     14   char         outDir[80];        // Directory containing files to be sent 
     15   ew_thread_t  threadId; 
     16   int          threadAlive;       // 1 if alive; 0 if dead 
    1717} SERVER;                      // One instance of SERVER per thread 
    1818 
     
    3838void CloseSocketConnection( int sd ); 
    3939FILE *fopen_excl( const char *fname, const char *mode ); 
    40 int  ThreadAlive( unsigned int tid ); 
     40int  ThreadAlive( ew_thread_t tid ); 
    4141 
    4242#endif 
  • trunk/src/data_exchange/sendfilemt/sendfilemt.h

    r7672 r7775  
    1010typedef struct 
    1111{ 
    12    char     tag[13];           /* Tag to appear in log file */ 
    13    char     ip[20];            /* IP address of system to receive msg's */ 
    14    int      port;              /* Well-known port number */ 
    15    char     outDir[80];        /* Directory containing files to be sent */ 
    16    unsigned threadId; 
    17    int      threadAlive;       /* 1 if alive; 0 if dead */ 
     12   char         tag[13];           /* Tag to appear in log file */ 
     13   char         ip[20];            /* IP address of system to receive msg's */ 
     14   int          port;              /* Well-known port number */ 
     15   char         outDir[80];        /* Directory containing files to be sent */ 
     16   ew_thread_t  threadId; 
     17   int          threadAlive;       /* 1 if alive; 0 if dead */ 
    1818} SERVER;                      /* One instance of SERVER per thread */ 
    1919 
     
    4040void CloseSocketConnection( int ); 
    4141FILE *fopen_excl( const char *, const char * ); 
    42 int  ThreadAlive( unsigned int ); 
     42int  ThreadAlive( ew_thread_t ); 
    4343 
    4444#endif 
  • trunk/src/data_exchange/sendfilemt/thread_sol.c

    r4442 r7775  
    1919    **************************************************************/ 
    2020 
    21 int ThreadAlive( unsigned int tid ) 
     21int ThreadAlive( ew_thread_t tid ) 
    2222{ 
    2323   return (thr_kill(tid, 0) == 0) ? THREAD_ALIVE : THREAD_DEAD; 
  • trunk/src/data_exchange/sendfilemt/thread_unix.c

    r5375 r7775  
    1919    **************************************************************/ 
    2020 
    21 int ThreadAlive( unsigned int tid ) 
     21int ThreadAlive( ew_thread_t tid ) 
    2222{ 
    2323   return (pthread_kill((pthread_t) tid, 0) == 0) ? THREAD_ALIVE : THREAD_DEAD; 
  • trunk/src/data_exchange/sendfilemt/thread_win.c

    r4442 r7775  
    1414    **************************************************************/ 
    1515 
    16 int ThreadAlive( unsigned int tid ) 
     16int ThreadAlive( ew_thread_t tid ) 
    1717{ 
    1818   DWORD exitCode = 0; 
  • trunk/src/data_sources/gcf2ew/externs.h

    r2427 r7775  
    5151EXTERN int InjectSOH;                   /* 1 if TYPE_GCFSOH_PACKETS should be sent , 0 not sent */ 
    5252 
    53 EXTERN time_t   TSLastBeat;             /* time stamp since last heartbeat */ 
    54 EXTERN unsigned TidHB;                  /* ID for the hearbeat thread */ 
     53EXTERN time_t           TSLastBeat;             /* time stamp since last heartbeat */ 
     54EXTERN ew_thread_t      TidHB;                  /* ID for the hearbeat thread */ 
    5555/****************************************************************/ 
    5656/* GCF globals */ 
  • trunk/src/data_sources/gdi2ew/gdi_defs.h

    r6967 r7775  
    282282    GDI_ConnectionState state;                   //!< Client/Server relation state 
    283283    //thread_t thread;                             //!< GDI client thread 
    284     unsigned int thread_id;                      //!< Keeps thread ID 
     284    ew_thread_t thread_id;                      //!< Keeps thread ID 
    285285    mutex_t mutex;                               //!< This server connection mutex 
    286286    gdi_sample_handler sample_handler;           //!< Sample handler registered for this server connection 
  • trunk/src/data_sources/geojson2ew/externs.h

    r6923 r7775  
    4848EXTERN unsigned char TypeErr;           /* Error EW type for logo */ 
    4949 
    50 EXTERN time_t   TSLastBeat;             /* time stamp since last heartbeat */ 
    51 EXTERN unsigned TidHB;                  /* ID for the hearbeat thread */ 
     50EXTERN time_t           TSLastBeat;             /* time stamp since last heartbeat */ 
     51EXTERN ew_thread_t      TidHB;                  /* ID for the hearbeat thread */ 
  • trunk/src/data_sources/k2ew/glbvars.h

    r7291 r7775  
    113113extern volatile int g_mt_working;      /* =1 says main thread is working */ 
    114114extern volatile int g_ot_working;      /* =1 says output thread is working */ 
    115 extern unsigned g_output_threadid;     /* ID value for output thread */ 
    116 extern unsigned g_hrtbt_threadid;      /* ID value for heartbeat thread */ 
     115extern ew_thread_t g_output_threadid;     /* ID value for output thread */ 
     116extern ew_thread_t g_hrtbt_threadid;      /* ID value for heartbeat thread */ 
    117117extern pid_t g_pidval;                 /* Our PID for heartbeat messages */ 
    118118extern int g_wait_count;               /* Count of waiting slots in buffer */ 
  • trunk/src/data_sources/k2ew/heartbt.c

    r7106 r7775  
    4848    if ( (difftime(timevar,last_hb_time) >= (double)gcfg_heartbeat_itvl) && 
    4949         (g_mt_working == 1) &&  
    50          (g_output_threadid == (unsigned) -1 || g_ot_working == 1)) 
     50         (g_output_threadid == (ew_thread_t) -1 || g_ot_working == 1)) 
    5151    {   
    5252      /* Beat our heart */       
  • trunk/src/data_sources/k2ew/k2ewmain.c

    r7606 r7775  
    385385volatile int g_mt_working = 1;    /* =1 says main thread is working */ 
    386386volatile int g_ot_working = 0;    /* =1 says output thread is working */ 
    387 unsigned g_output_threadid=(unsigned)-1;    /* ID for output thread */ 
    388 unsigned g_hrtbt_threadid=(unsigned)-1;     /* ID for heartbeat thread */ 
     387ew_thread_t g_output_threadid=(ew_thread_t)-1;    /* ID for output thread */ 
     388ew_thread_t g_hrtbt_threadid=(ew_thread_t)-1;     /* ID for heartbeat thread */ 
    389389pid_t g_pidval = 0;                 /* Our PID for heartbeat messages */ 
    390390int g_wait_count = 0;             /* number of "wait" blocks in buffer */ 
  • trunk/src/data_sources/k2ew/terminat.c

    r7691 r7775  
    9191  {      /* no other thread using function */ 
    9292    infn_flg = 1;              /* indicate now in function */ 
    93     if (g_output_threadid != (unsigned)-1)    /* if read thread running then */ 
     93    if (g_output_threadid != (ew_thread_t)-1)    /* if read thread running then */ 
    9494      KillThread(g_output_threadid);         /* terminate read thread */ 
    9595 
  • trunk/src/data_sources/nq2ring/main.c

    r6803 r7775  
    3636 
    3737time_t MyLastInternalBeat;   /* time of last heartbeat into the local Earthworm ring */ 
    38 unsigned  TidHeart;          /* thread id. was type thread_t on Solaris!             */ 
     38ew_thread_t  TidHeart;          /* thread id. was type thread_t on Solaris!             */ 
    3939 
    4040int granulated;              /* if = 1, tracebufs always start on integer seconds    */ 
  • trunk/src/data_sources/q2ew/externs.h

    r2514 r7775  
    4242 
    4343EXTERN time_t   TSLastBeat;             /* time stamp since last heartbeat */ 
    44 EXTERN unsigned TidHB;                  /* ID for the hearbeat thread */ 
     44EXTERN ew_thread_t TidHB;                       /* ID for the hearbeat thread */ 
    4545EXTERN int UseTraceBuf2;                /* IGD 2006/11/20 1 if use TBuf2, 0 if TBuf old style */ 
    4646/****************************************************************/ 
  • trunk/src/data_sources/q3302ew/externs.h

    r2929 r7775  
    1212extern SHM_INFO Region; 
    1313extern time_t   Heartbeat_lastBeatTime;         /* time stamp since last heartbeat */ 
    14 extern unsigned Heartbeat_threadID;                     /* ID for the hearbeat thread */ 
     14extern ew_thread_t Heartbeat_threadID;                  /* ID for the hearbeat thread */ 
    1515extern int ShutMeDown; 
    1616#endif 
  • trunk/src/data_sources/q3302ew/heart.c

    r7472 r7775  
    7070 
    7171time_t  Heartbeat_lastBeatTime;         /* time stamp since last heartbeat */ 
    72 unsigned Heartbeat_threadID;                    /* ID for the hearbeat thread */ 
     72ew_thread_t Heartbeat_threadID;                 /* ID for the hearbeat thread */ 
    7373 
    7474/* Heartbeat thread 
  • trunk/src/data_sources/reftek2ew/hbeat.c

    r7499 r7775  
    104104INT32 now; 
    105105REAL64 dtime; 
    106 unsigned tid; 
     106ew_thread_t tid; 
    107107 
    108108    now = (INT32) hrtime_ew(&dtime); 
  • trunk/src/data_sources/tideweb2ew/tideweb2ew.c

    r6918 r7775  
    3737 
    3838time_t MyLastInternalBeat;   /* time of last heartbeat into the local Earthworm ring */ 
    39 unsigned  TidHeart;          /* thread id. was type thread_t on Solaris!             */ 
     39ew_thread_t  TidHeart;          /* thread id. was type thread_t on Solaris!             */ 
    4040 
    4141int     GaugePollSecs; 
     
    9090time_t  TSLastBeat;             /* time stamp since last heartbeat */ 
    9191time_t  timeNow;                /* time stamp since last heartbeat */ 
    92 unsigned TidHB;                 /* ID for the hearbeat thread */ 
     92ew_thread_t TidHB;                      /* ID for the hearbeat thread */ 
    9393 
    9494int numCodes = 0;       /* Number of codes on a webpage */ 
  • trunk/src/data_sources/winsdr2ew/Ws2Ew.c

    r7606 r7775  
    2424SOCKET listenSock = SOCKET_ERROR;               // Listener Socket 
    2525int exitListenThread = 0, exitListenAck = 0; 
    26 unsigned  tidListen, tidReceive; 
     26ew_thread_t  tidListen, tidReceive; 
    2727time_t listenRestartTime; 
    2828 
  • trunk/src/data_sources/winsdr2ew/Ws2Ew.h

    r7606 r7775  
    8181        int noDataReport; 
    8282        SOCKET sock; 
    83         unsigned tidReceive;  
     83        ew_thread_t tidReceive;  
    8484        time_t updateTime; 
    8585        time_t connectTime; 
  • trunk/src/diagnostic_tools/config_ws/config_ws.c

    r2715 r7775  
    7575 ***************/ 
    7676#define THREAD_STACK 8192 
    77 static unsigned tidHandler;           /* handler thread id */ 
    78 static unsigned tidStacker;           /* Thread moving messages from transport */ 
    79 static unsigned tidInteractive;       /* Thread handleing interactions     */ 
     77static ew_thread_t tidHandler;           /* handler thread id */ 
     78static ew_thread_t tidStacker;           /* Thread moving messages from transport */ 
     79static ew_thread_t tidInteractive;       /* Thread handleing interactions     */ 
    8080 
    8181                                     /* to queue */ 
  • trunk/src/diagnostic_tools/latency_mon/latency_mon.c

    r2722 r7775  
    572572                  ) 
    573573{ 
    574    char          configfile[64];  /* Name of config file */ 
    575    int           i; 
    576    long          InBufl;          /* Maximum message size in bytes */ 
    577    char          line[40];        /* Heartbeat message */ 
    578    int           lineLen;         /* Length of heartbeat message */ 
    579    MSG_LOGO      logo;            /* Logo of retrieved msg */ 
    580    long          MsgLen;          /* Size of retrieved message */ 
    581    static unsigned tidW;          /* Waveform getter Thread */ 
    582    static WNDCLASS wc; 
    583    time_t  now;              /* Current time */ 
     574   char                         configfile[64];  /* Name of config file */ 
     575   int                          i; 
     576   long                         InBufl;          /* Maximum message size in bytes */ 
     577   char                         line[40];        /* Heartbeat message */ 
     578   int                          lineLen;         /* Length of heartbeat message */ 
     579   MSG_LOGO                     logo;            /* Logo of retrieved msg */ 
     580   long                         MsgLen;          /* Size of retrieved message */ 
     581   static ew_thread_t   tidW;            /* Waveform getter Thread */ 
     582   static WNDCLASS              wc; 
     583   time_t                               now;             /* Current time */ 
    584584 
    585585   hInstMain = hInst; 
  • trunk/src/diagnostic_tools/ringVtanks/ringvtanks.c

    r7675 r7775  
    105105 **************/ 
    106106#define THREAD_STACK 8192 
    107 static unsigned tidProcessor;      /* Message processing thread id */ 
     107static ew_thread_t tidProcessor;      /* Message processing thread id */ 
    108108 
    109109thr_ret MessageProcessor( void * ); 
  • trunk/src/diagnostic_tools/sniffrings/sniffrings.c

    r6835 r7775  
    121121  TYPE_GETUTIL_INFO getutil_info; 
    122122 
    123   unsigned     tidMessagePrinter;                 /* Thread read message from queue and populate DB */ 
     123  ew_thread_t     tidMessagePrinter;                 /* Thread read message from queue and populate DB */ 
    124124  TYPE_ARGS_PRINTER args_printer; 
    125125 
    126   unsigned     tidStacker[MAX_NUM_OF_RINGS];                    /* Thread moving messages from transport to queue */ 
     126  ew_thread_t     tidStacker[MAX_NUM_OF_RINGS];                    /* Thread moving messages from transport to queue */ 
    127127  TYPE_ARGS_STACKER args_stacker[MAX_NUM_OF_RINGS]; 
    128128  int          r = 0; 
  • trunk/src/display/sgram/sgram.c

    r7606 r7775  
    177177#define THREAD_STACK_SIZE 8192 
    178178time_t MyLastInternalBeat;      /* time of last heartbeat into the local Earthworm ring    */ 
    179 unsigned  TidHeart;             /* thread id. was type thread_t on Solaris! */ 
     179ew_thread_t  TidHeart;             /* thread id. was type thread_t on Solaris! */ 
    180180 
    181181/* Error words used by this module 
  • trunk/src/eew/pick_gm/pick_gm.c

    r7201 r7775  
    109109        int     loop_condition,count; 
    110110 
    111         unsigned  tidThrdGM;                /* Filter thread id              */ 
    112         unsigned  tidThrdGMX;                /* Filter thread id              */ 
     111        ew_thread_t  tidThrdGM;                /* Filter thread id              */ 
     112        ew_thread_t  tidThrdGMX;                /* Filter thread id              */ 
    113113        int numOfElementsInQueue; 
    114114 
  • trunk/src/grab_bag/activated_scripts/activated_scripts.c

    r7522 r7775  
    8888 
    8989#define THREAD_STACK 8192 
    90 static unsigned tidStacker;          /* Thread moving messages from transport */ 
    91 static unsigned tidProcess;          /* Processor thread id */ 
     90static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
     91static ew_thread_t tidProcess;          /* Processor thread id */ 
    9292 
    9393#define NUMREQ 4 
  • trunk/src/grab_bag/pick_recorder/pick_recorder.c

    r7253 r7775  
    102102/* Thread stuff */ 
    103103#define THREAD_STACK 8192 
    104 static unsigned tidProcessor;    /* Processor thread id */ 
    105 static unsigned tidStacker;      /* Thread moving messages from InRing */ 
     104static ew_thread_t tidProcessor;    /* Processor thread id */ 
     105static ew_thread_t tidStacker;      /* Thread moving messages from InRing */ 
    106106                                 /* to MsgQueue */ 
    107107int MessageStackerStatus = 0;      /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/libsrc/libdali/parse_ip_address.c

    r7606 r7775  
    127127#include <stdint.h>                     /* uint8_t */ 
    128128#include <stdlib.h>                     /* NULL */ 
     129#include <stdio.h> 
    129130#include <string.h> 
    130131 
     
    132133#include <sys/socket.h> 
    133134#include <netdb.h> 
     135#include <arpa/inet.h> 
    134136#endif 
    135137 
  • trunk/src/libsrc/solaris/threads_ew.c

    r7538 r7775  
    3838int StartThread( thr_ret (*fun)( void * ), 
    3939                 unsigned int stack_size, 
    40                  unsigned int *thread_id ) { 
     40                 ew_thread_t *thread_id ) { 
    4141 
    4242   int rc;                       /* Function return code */ 
     
    5959      return -1; 
    6060 
    61    *thread_id = (unsigned int) tid; 
     61   *thread_id = (ew_thread_t) tid; 
    6262 
    6363   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    8888                        void *arg, 
    8989                        unsigned int stack_size, 
    90                         unsigned int *thread_id ) { 
     90                        ew_thread_t *thread_id ) { 
    9191 
    9292   int rc;                       /* Function return code */ 
     
    109109      return -1; 
    110110 
    111    *thread_id = (unsigned int) tid; 
     111   *thread_id = (ew_thread_t) tid; 
    112112 
    113113   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    128128   *************************************************************/ 
    129129 
    130 int WaitThread( unsigned int *thread_id ) { 
     130int WaitThread( ew_thread_t *thread_id ) { 
    131131   return 0; 
    132132} 
     
    144144    ************************************************************/ 
    145145 
    146 int KillThread( unsigned int tid ) { 
     146int KillThread( ew_thread_t tid ) { 
    147147   return( thr_kill( (thread_t) tid, SIGUSR1 ) ); 
    148148} 
  • trunk/src/libsrc/unix/threads_ew.c

    r7538 r7775  
    4949int StartThread( thr_ret (*fun)( void * ), 
    5050                 unsigned int stack_size, 
    51                  unsigned int *thread_id ) { 
     51                 ew_thread_t *thread_id ) { 
    5252 
    5353   int error;                     /* Function return code */ 
     
    103103        } 
    104104 
    105    *thread_id = (unsigned int) tid; 
     105   *thread_id = (ew_thread_t) tid; 
    106106 
    107107   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    132132                        void *arg, 
    133133                        unsigned int stack_size,  
    134                         unsigned int *thread_id ) { 
     134                        ew_thread_t *thread_id ) { 
    135135 
    136136   int error;                    /* Function return code */ 
     
    182182        } 
    183183 
    184    *thread_id = (unsigned int) tid; 
     184   *thread_id = (ew_thread_t) tid; 
    185185 
    186186   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    201201   *************************************************************/ 
    202202 
    203 int WaitThread( unsigned int *thread_id ) { 
     203int WaitThread( ew_thread_t *thread_id ) { 
    204204   return 0; 
    205205} 
     
    217217    ************************************************************/ 
    218218 
    219 int KillThread( unsigned int tid ) { 
     219int KillThread( ew_thread_t tid ) { 
    220220   return( pthread_kill( (pthread_t) tid, SIGUSR1 ) ); 
    221221} 
  • trunk/src/libsrc/util/parse_ip_address.c

    r7606 r7775  
    127127#include <stdint.h>        /* uint8_t */ 
    128128#include <stdlib.h>        /* NULL */ 
     129#include <string.h>        /*  strchr() */ 
     130#include <stdio.h>                 /* sscanf() */ 
    129131 
    130132#include <socket_ew.h> 
  • trunk/src/libsrc/util/startstop_unix_generic.c

    r7542 r7775  
    399399 
    400400         if     ( msglogo.type == metaring.TypeRestart   ){ 
    401             unsigned tid; 
     401            ew_thread_t tid; 
    402402            if ( StartThreadWithArg( &RestartChildThread, msg, 0, &tid ) == -1 ) { 
    403403                logit( "et", "startstop: couldn't do restart in background\n"); 
     
    444444            } 
    445445         } else if( msglogo.type == metaring.TypeStop   ) { 
    446             unsigned tid; 
     446            ew_thread_t tid; 
    447447            if ( StartThreadWithArg( &StopChildThread, msg, 0, &tid ) == -1 ) { 
    448448                logit( "et", "startstop: couldn't do stop in background\n"); 
     
    911911  ******************************************************************/ 
    912912 
    913 void Threads( void *fun( void * ), thread_t *tid ) /* *tid is pointer to thread id */ 
     913void Threads( void *fun( void * ), ew_thread_t *tid ) /* *tid is pointer to thread id */ 
    914914{ 
    915915   const size_t stackSize = 0;          /* Use default values */ 
    916916#ifdef _USE_PTHREADS 
    917917   /* Just use the ew library call (since POSIX doesn't do daemons) */ 
    918    if ( StartThread(fun,stackSize,(unsigned*)tid) == -1 ) { 
     918   if ( StartThread(fun,stackSize,(ew_thread_t*)tid) == -1 ) { 
    919919    fprintf(stderr, "startstop: can't create thread\n"); 
    920920    exit( -1 ); 
     
    20472047{ 
    20482048   int      i; 
    2049    thread_t tid; 
     2049   ew_thread_t tid; 
    20502050   boolean RestartStatus = FALSE; 
    20512051 
  • trunk/src/libsrc/util/xfrm.c

    r7513 r7775  
    12391239int main (int argc, char **argv)  
    12401240{ 
    1241   XFRMWORLD *World;                /* Our main data structure              */ 
    1242   time_t    timeNow;               /* current time                         */  
    1243   time_t    timeLastBeat;          /* time last heartbeat was sent         */ 
    1244   long      sizeMsg;               /* size of retrieved message            */ 
    1245   SHM_INFO  regionIn;              /* Input shared memory region info.     */ 
    1246   MSG_LOGO  logoWave[MAX_LOGO];    /* Logo(s) of requested waveforms.      */ 
    1247   int       ilogo;                 /* working counter                      */ 
    1248   MSG_LOGO  logoMsg;               /* logo of retrieved message            */ 
    1249   unsigned  tidXfrmor;             /* Transformer thread id                */ 
    1250   char     *inBuf;                 /* Pointer to the input message buffer. */ 
    1251   int       inBufLen;              /* Size of input message buffer         */ 
    1252   TracePacket  *TracePkt; 
    1253   int       ret; 
    1254   char      msgText[MAXMESSAGELEN];/* string for log/error messages        */ 
     1241  XFRMWORLD     *World;                /* Our main data structure              */ 
     1242  time_t        timeNow;               /* current time                         */  
     1243  time_t        timeLastBeat;          /* time last heartbeat was sent         */ 
     1244  long          sizeMsg;               /* size of retrieved message            */ 
     1245  SHM_INFO      regionIn;              /* Input shared memory region info.     */ 
     1246  MSG_LOGO      logoWave[MAX_LOGO];    /* Logo(s) of requested waveforms.      */ 
     1247  int           ilogo;                 /* working counter                      */ 
     1248  MSG_LOGO      logoMsg;               /* logo of retrieved message            */ 
     1249  ew_thread_t   tidXfrmor;             /* Transformer thread id                */ 
     1250  char                  *inBuf;                 /* Pointer to the input message buffer. */ 
     1251  int           inBufLen;              /* Size of input message buffer         */ 
     1252  TracePacket   *TracePkt; 
     1253  int           ret; 
     1254  char          msgText[MAXMESSAGELEN];/* string for log/error messages        */ 
    12551255 
    12561256  /* Allocate a WORLD 
  • trunk/src/libsrc/winnt/startstop_winlib.c

    r7542 r7775  
    13551355         msg[msgsize]='\0';  /* Null-terminate it for easy handling */ 
    13561356         if     ( msglogo.type == metaring->TypeRestart   ) { 
    1357             int tid; 
     1357            ew_thread_t tid; 
    13581358            void *args[4];             /* set values separately instead   */ 
    13591359            args[0] = (void*)msg;      /*  of aggregate initializer to    */ 
     
    13611361            args[2] = (void*)child;    /*  non-standard extension         */ 
    13621362            args[3] = (void*)nChild; 
    1363             if ( StartThreadWithArg( RestartChildThread, (void*)args, 0, (unsigned*)&tid ) == -1 ) { 
     1363            if ( StartThreadWithArg( RestartChildThread, (void*)args, 0, (ew_thread_t*)&tid ) == -1 ) { 
    13641364                logit( "et", "startstop: couldn't do restart in background\n"); 
    13651365                RestartChild( msg, metaring, child, nChild  ); 
     
    13701370          ********************************************************************/ 
    13711371         } else if( msglogo.type == metaring->TypeStop ) { 
    1372             int tid; 
     1372            ew_thread_t tid; 
    13731373            void *args[4];             /* set values separately instead   */ 
    13741374            args[0] = (void*)msg;      /*  of aggregate initializer to    */ 
     
    13761376            args[2] = (void*)child;    /*  non-standard extension         */ 
    13771377            args[3] = (void*)nChild; 
    1378             if ( StartThreadWithArg( StopChildThread, (void*)args, 0, (unsigned*)&tid ) == -1 ) { 
     1378            if ( StartThreadWithArg( StopChildThread, (void*)args, 0, (ew_thread_t*)&tid ) == -1 ) { 
    13791379                logit( "et", "startstop: couldn't do restart in background\n"); 
    13801380                StopChild( msg, metaring, child, nChild, &placeholder); 
     
    16511651void StartNewConsolePipeThread() 
    16521652{ 
    1653     unsigned tid; 
     1653    ew_thread_t tid; 
    16541654 
    16551655    newConsolePipeThreadFlag = TRUE;        //set FALSE to terminate thread 
     
    17901790void LaunchPipeConsole() 
    17911791{ 
    1792     unsigned tid; 
     1792    ew_thread_t tid; 
    17931793     
    17941794    if(isPipeConsoleRunning()) 
  • trunk/src/libsrc/winnt/threads_ew.c

    r7538 r7775  
    3535int StartThread( thr_ret (*fun)( void * ), 
    3636                 unsigned int stack_size, 
    37                  unsigned int *thread_id ) { 
     37                 ew_thread_t *thread_id ) { 
    3838 
    3939   uintptr_t tid; 
     
    4444      return -1; 
    4545 
    46    *thread_id = (unsigned int) tid; 
     46   *thread_id = (ew_thread_t) tid; 
    4747 
    4848   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    7676                        void *arg, 
    7777                        unsigned int stack_size,  
    78                         unsigned int *thread_id ) { 
     78            ew_thread_t *thread_id ) { 
    7979 
    8080   uintptr_t tid; 
     
    8585      return -1; 
    8686 
    87    *thread_id = (unsigned int) tid; 
     87   *thread_id = (ew_thread_t) tid; 
    8888 
    8989   if ( *thread_id != tid )             /* Critical on 64-bit systems */ 
     
    118118   *************************************************************/ 
    119119 
    120 int WaitThread( unsigned int *thread_id ) { 
     120int WaitThread( ew_thread_t *thread_id ) { 
    121121   if ( WaitForSingleObject( (HANDLE) (*thread_id), INFINITE ) 
    122122                                              == WAIT_FAILED ) 
     
    141141    ************************************************************/ 
    142142 
    143 int KillThread( unsigned int thread_id ) { 
     143int KillThread( ew_thread_t thread_id ) { 
    144144 
    145145    const DWORD exit_code = 0; 
  • trunk/src/libsrc_cpp/util/simple_mod_base.cpp

    r7498 r7775  
    762762       * Start Stacker and Handler threads. 
    763763       */ 
    764       int _arg; 
     764      ew_thread_t _arg; 
    765765//      TO_THREAD_ID _tid; 
    766766 
  • trunk/src/reporting/nq2gif/main.c

    r7334 r7775  
    3636 
    3737time_t MyLastInternalBeat;      /* time of last heartbeat into the local Earthworm ring    */ 
    38 unsigned  TidHeart;             /* thread id. was type thread_t on Solaris! */ 
     38ew_thread_t  TidHeart;          /* thread id. was type thread_t on Solaris! */ 
    3939 
    4040/* Other globals 
  • trunk/src/seismic_processing/Mm/Mm.c

    r6803 r7775  
    9494#ifdef _WINNT 
    9595   char         *paramdir; 
    96    static unsigned tidC;          /* LP semaphore checker Thread */ 
    97 #endif 
    98    static unsigned tidH;          /* Hypocenter getter Thread */ 
    99    static unsigned tidW;          /* Waveform getter Thread */ 
     96   static ew_thread_t tidC;          /* LP semaphore checker Thread */ 
     97#endif 
     98   static ew_thread_t tidH;          /* Hypocenter getter Thread */ 
     99   static ew_thread_t tidW;          /* Waveform getter Thread */ 
    100100 
    101101   dLastEndTime      = 0.; 
  • trunk/src/seismic_processing/Ms/Ms.c

    r6803 r7775  
    8888#ifdef _WINNT 
    8989   char         *paramdir; 
    90    static unsigned tidC;          /* LP semaphore checker Thread */ 
    91 #endif 
    92    static unsigned tidH;          /* Hypocenter getter Thread */ 
    93    static unsigned tidW;          /* Waveform getter Thread */ 
     90   static ew_thread_t tidC;          /* LP semaphore checker Thread */ 
     91#endif 
     92   static ew_thread_t tidH;          /* Hypocenter getter Thread */ 
     93   static ew_thread_t tidW;          /* Waveform getter Thread */ 
    9494 
    9595   dLastEndTime      = 0.; 
  • trunk/src/seismic_processing/Theta/Theta.c

    r6803 r7775  
    9393#ifdef _WINNT 
    9494   char         *paramdir; 
    95    static unsigned tidC;          /* Theta semaphore checker Thread */ 
    96 #endif 
    97    static unsigned tidH;          /* Hypocenter getter Thread */ 
    98    static unsigned tidW;          /* Waveform getter Thread */ 
     95   static ew_thread_t tidC;          /* Theta semaphore checker Thread */ 
     96#endif 
     97   static ew_thread_t tidH;          /* Hypocenter getter Thread */ 
     98   static ew_thread_t tidW;          /* Waveform getter Thread */ 
    9999 
    100100   dLastEndTime      = 0.; 
  • trunk/src/seismic_processing/carlsubtrig/carlsubtrig.c

    r7260 r7775  
    107107  char          inBuf[MAXLINELEN];      /* Pointer to the input message */ 
    108108                                        /*   buffer.                    */ 
    109   unsigned int  tidSubnet;      /* id of Subnet thread                  */ 
     109  ew_thread_t   tidSubnet;      /* id of Subnet thread                  */ 
    110110  int           result;         /* Result from function calls.          */ 
    111111  long          sizeMsg;        /* Size of retrieved message.           */ 
  • trunk/src/seismic_processing/decimate/decimate.c

    r7325 r7775  
    7373int main (int argc, char **argv) 
    7474{ 
    75   WORLD     Dcm;                   /* Our main data structure              */ 
    76   time_t    timeNow;               /* current time                         */  
    77   time_t    timeLastBeat;          /* time last heartbeat was sent         */ 
    78   long      sizeMsg;               /* size of retrieved message            */ 
    79   SHM_INFO  regionIn;              /* Input shared memory region info.     */ 
    80   MSG_LOGO  logoWave[MAX_LOGO];    /* Logo(s) of requested waveforms.      */ 
    81   int       ilogo;                 /* working counter                      */ 
    82   MSG_LOGO  logoMsg;               /* logo of retrieved message            */ 
    83   unsigned  tidDecimator;          /* Decimator thread id                  */ 
    84   char     *inBuf;                 /* Pointer to the input message buffer. */ 
    85   int       inBufLen;              /* Size of input message buffer         */ 
     75  WORLD         Dcm;                   /* Our main data structure              */ 
     76  time_t        timeNow;               /* current time                         */  
     77  time_t        timeLastBeat;          /* time last heartbeat was sent         */ 
     78  long          sizeMsg;               /* size of retrieved message            */ 
     79  SHM_INFO      regionIn;              /* Input shared memory region info.     */ 
     80  MSG_LOGO      logoWave[MAX_LOGO];    /* Logo(s) of requested waveforms.      */ 
     81  int           ilogo;                 /* working counter                      */ 
     82  MSG_LOGO      logoMsg;               /* logo of retrieved message            */ 
     83  ew_thread_t   tidDecimator;          /* Decimator thread id                  */ 
     84  char                  *inBuf;                /* Pointer to the input message buffer. */ 
     85  int           inBufLen;              /* Size of input message buffer         */ 
    8686  TracePacket  *TracePkt; 
    87   int       ret; 
    88   char  msgText[MAXMESSAGELEN];    /* string for log/error messages    */ 
     87  int           ret; 
     88  char                  msgText[MAXMESSAGELEN]; /* string for log/error messages    */ 
    8989 
    9090  /* Check command line arguments  
  • trunk/src/seismic_processing/eqbuf/eqbuf.c

    r7691 r7775  
    6363#pragma clang diagnostic ignored "-Wmissing-field-initializers" 
    6464#endif 
    65    MSG_LOGO reclogo = { 0 }; 
     65   MSG_LOGO     reclogo = { 0 }; 
    6666#ifdef __clang__ 
    6767#pragma clang diagnostic pop 
    6868#endif 
    69    int      type = 0; 
    70    char     *configFile; 
    71    unsigned tid; 
    72    int      rc; 
    73    thr_ret  SendMsg( void * ); 
     69   int          type = 0; 
     70   char         *configFile; 
     71   ew_thread_t  tid; 
     72   int          rc; 
     73   thr_ret      SendMsg( void * ); 
    7474 
    7575/* Check the program arguments 
  • trunk/src/seismic_processing/eqfilter/eqfilter.c

    r7267 r7775  
    174174/* Thread stuff */ 
    175175#define THREAD_STACK 8192 
    176 static unsigned tidProcessor;    /* Processor thread id */ 
    177 static unsigned tidStacker;      /* Thread moving messages from InRing */ 
     176static ew_thread_t tidProcessor;    /* Processor thread id */ 
     177static ew_thread_t tidStacker;      /* Thread moving messages from InRing */ 
    178178                                 /* to MsgQueue */ 
    179179int MessageStackerStatus = 0;      /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/seismic_processing/eqfilterII/eqfilterII.c

    r7445 r7775  
    5757/* Thread stuff */ 
    5858#define THREAD_STACK 8192 
    59 static unsigned tidProcessor;    /* Processor thread id */ 
    60 static unsigned tidStacker;      /* Thread moving messages from InRing */ 
     59static ew_thread_t tidProcessor;    /* Processor thread id */ 
     60static ew_thread_t tidStacker;      /* Thread moving messages from InRing */ 
    6161                                 /* to MsgQueue */ 
    6262int MessageStackerStatus = 0;      /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/seismic_processing/ew2ssam/ew2ssam.c

    r7367 r7775  
    7575/* Thread stuff */ 
    7676#define THREAD_STACK 8192 
    77 static unsigned tidProcessor;    /* Processor thread id */ 
    78 static unsigned tidStacker;      /* Thread moving messages from InRing */ 
     77static ew_thread_t tidProcessor;    /* Processor thread id */ 
     78static ew_thread_t tidStacker;      /* Thread moving messages from InRing */ 
    7979                                 /* to MsgQueue */ 
    8080int MessageStackerStatus = 0;      /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/seismic_processing/ew_rsamalarm/ew_rsamalarm.c

    r7475 r7775  
    178178 ***************/ 
    179179#define THREAD_STACK 8192 
    180 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     180static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    181181                                     /*   to queue */ 
    182182 
     
    212212char *Argv0;            /* pointer to executable name */ 
    213213pid_t MyPid;        /* Our own pid, sent with heartbeat for restart purposes */ 
    214 static unsigned tidProcess; 
     214static ew_thread_t tidProcess; 
    215215 
    216216mutex_t reconfig_mutex; 
  • trunk/src/seismic_processing/ewaccel/ewaccel.c

    r7475 r7775  
    112112 ***************/ 
    113113#define THREAD_STACK 8192 
    114 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     114static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    115115                                     /*   to queue */ 
    116116 
     
    143143char *Argv0;            /* pointer to executable name */ 
    144144pid_t MyPid;        /* Our own pid, sent with heartbeat for restart purposes */ 
    145 static unsigned tidProcess; 
     145static ew_thread_t tidProcess; 
    146146 
    147147/* Things to read or derive from configuration file 
  • trunk/src/seismic_processing/ewnotify/ewnotify.c

    r7159 r7775  
    100100 
    101101#define THREAD_STACK 8192 
    102 static unsigned tidStacker;          /* Thread moving messages from transport */ 
    103 static unsigned tidProcess;          /* Processor thread id */ 
     102static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
     103static ew_thread_t tidProcess;          /* Processor thread id */ 
    104104 
    105105char inRing[MAX_RING_STR];                      /* name of input ring */ 
  • trunk/src/seismic_processing/ewshear/ewshear.c

    r7522 r7775  
    126126 
    127127#define THREAD_STACK 8192 
    128 static unsigned tidStacker;          /* Thread moving messages from transport */ 
    129 static unsigned tidProcess;          /* Processor thread id */ 
     128static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
     129static ew_thread_t tidProcess;          /* Processor thread id */ 
    130130 
    131131static int windowSamples; 
  • trunk/src/seismic_processing/ewspectra/ewspectra.c

    r7534 r7775  
    9595 
    9696#define THREAD_STACK 8192 
    97 static unsigned tidStacker;          /* Thread moving messages from transport */ 
    98 static unsigned tidProcess;          /* Processor thread id */ 
     97static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
     98static ew_thread_t tidProcess;          /* Processor thread id */ 
    9999 
    100100int numPeaks = 0; 
  • trunk/src/seismic_processing/ewthresh/ewthresh.c

    r7475 r7775  
    121121 ***************/ 
    122122#define THREAD_STACK 8192 
    123 static unsigned tidStacker;          /* Thread moving messages from transport */ 
     123static ew_thread_t tidStacker;          /* Thread moving messages from transport */ 
    124124                                     /*   to queue */ 
    125125 
  • trunk/src/seismic_processing/fir/fir.c

    r7328 r7775  
    5454  time_t timeLastBeat;             /* time last heartbeat was sent  */ 
    5555  long  sizeMsg;                   /* size of retrieved message     */ 
    56   SHM_INFO  regionIn;              /* Input shared memory region info.     */ 
    57   MSG_LOGO  logoWave;              /* Logo of requested waveforms.  */ 
    58   MSG_LOGO  logoMsg;               /* logo of retrieved message     */ 
    59   unsigned  tidFir;                /* Filter thread id              */ 
     56  SHM_INFO      regionIn;              /* Input shared memory region info.     */ 
     57  MSG_LOGO      logoWave;              /* Logo of requested waveforms.  */ 
     58  MSG_LOGO      logoMsg;               /* logo of retrieved message     */ 
     59  ew_thread_t   tidFir;                /* Filter thread id              */ 
    6060  char *inBuf;                     /* Pointer to the input message buffer. */ 
    6161  int inBufLen;                    /* Size of input message buffer  */ 
  • trunk/src/seismic_processing/fir/fir_test.c

    r4013 r7775  
    3636  long  timeLastBeat;              /* time last heartbeat was sent  */ 
    3737  long  sizeMsg;                   /* size of retrieved message     */ 
    38   SHM_INFO  regionIn;              /* Input shared memory region info.     */ 
    39   MSG_LOGO  logoWave;              /* Logo of requested waveforms.  */ 
    40   MSG_LOGO  logoMsg;               /* logo of retrieved message     */ 
    41   unsigned  tidFir;                /* Filter thread id              */ 
     38  SHM_INFO      regionIn;              /* Input shared memory region info.     */ 
     39  MSG_LOGO      logoWave;              /* Logo of requested waveforms.  */ 
     40  MSG_LOGO      logoMsg;               /* logo of retrieved message     */ 
     41  ew_thread_t   tidFir;                /* Filter thread id              */ 
    4242  char *inBuf;                     /* Pointer to the input message buffer. */ 
    4343  int inBufLen;                    /* Size of input message buffer  */ 
  • trunk/src/seismic_processing/geqproc/geqproc.c

    r7323 r7775  
    7777/* Thread stuff */ 
    7878#define THREAD_STACK 8192 
    79 static unsigned tidProcessor;    /* Processor thread id */ 
    80 static unsigned tidStacker;      /* Thread moving messages from InRing */ 
     79static ew_thread_t tidProcessor;    /* Processor thread id */ 
     80static ew_thread_t tidStacker;      /* Thread moving messages from InRing */ 
    8181                                 /* to MsgQueue */ 
    8282int MessageStackerStatus = 0;      /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/seismic_processing/gmew/gmew.c

    r7691 r7775  
    255255{ 
    256256  GMEW *pEW = pgmParams->pEW; 
    257   unsigned int tidStacker; 
     257  ew_thread_t tidStacker; 
    258258 
    259259  /* Set up a queue; start the message-stacking thread to feed it */ 
  • trunk/src/seismic_processing/hypAssoc/hypAssoc.c

    r7499 r7775  
    3939***************/ 
    4040#define THREAD_STACK 8192 
    41 static unsigned tidAssociator;   /* Message processing thread id */ 
    42 static unsigned tidOutput;       /* Message processing thread id */ 
    43 static unsigned tidStacker;      /* Thread moving messages from transport * 
     41static ew_thread_t tidAssociator;   /* Message processing thread id */ 
     42static ew_thread_t tidOutput;       /* Message processing thread id */ 
     43static ew_thread_t tidStacker;      /* Thread moving messages from transport * 
    4444                                  *   to queue */ 
    4545static  int MessageStackerStatus=0;     /* 0=> Stacker thread ok. <0 => dead */ 
  • trunk/src/seismic_processing/loc_wcatwc/loc_wcatwc.c

    r7488 r7775  
    111111int main( int argc, char **argv ) 
    112112{ 
    113    int           i, j;            /* Loop counters */ 
    114    int           iRC; 
    115    char          PIn[MAX_PICKTWC_SIZE];/* Pointer to P-pick from ring */ 
    116    int           lineLen;         /* Length of heartbeat message */ 
    117    char          line[40];        /* Heartbeat message */ 
    118    long          MsgLen;          /* Size of retrieved message */ 
    119    MSG_LOGO      getlogo;         /* Logo of requested picks */ 
    120    MSG_LOGO      logo;            /* Logo of retrieved msg */ 
    121    MSG_LOGO      hrtlogo;         /* Logo of outgoing heartbeats */ 
    122    time_t        then;            /* Previous heartbeat time */ 
    123    char          *configfile;     /* Pointer to name of config file */ 
    124    pid_t         myPid;           /* Process id of this process */ 
    125    static unsigned tidLocate;     /* Quake Location Thread */ 
     113   int                          i, j;            /* Loop counters */ 
     114   int                          iRC; 
     115   char                         PIn[MAX_PICKTWC_SIZE];/* Pointer to P-pick from ring */ 
     116   int                          lineLen;         /* Length of heartbeat message */ 
     117   char                         line[40];        /* Heartbeat message */ 
     118   long                         MsgLen;          /* Size of retrieved message */ 
     119   MSG_LOGO                     getlogo;         /* Logo of requested picks */ 
     120   MSG_LOGO                     logo;            /* Logo of retrieved msg */ 
     121   MSG_LOGO                     hrtlogo;         /* Logo of outgoing heartbeats */ 
     122   time_t                       then;            /* Previous heartbeat time */ 
     123   char                         *configfile;     /* Pointer to name of config file */ 
     124   pid_t                        myPid;           /* Process id of this process */ 
     125   static ew_thread_t   tidLocate;     /* Quake Location Thread */ 
    126126#ifdef _WINNT 
    127127   char          *paramdir; 
  • trunk/src/seismic_processing/localmag/lm_main.c

    r7606 r7775  
    299299static void setUpThread( LMPARAMS *plmParams ) 
    300300{ 
    301   unsigned int tidStacker; 
     301  ew_thread_t tidStacker; 
    302302  LMEW *pEW = plmParams->pEW; 
    303303   
  • trunk/src/seismic_processing/nq2pgm/main.c

    r6803 r7775  
    4040 
    4141time_t MyLastInternalBeat;      /* time of last heartbeat into the local Earthworm ring    */ 
    42 unsigned  TidHeart;             /* thread id. was type thread_t on Solaris! */ 
     42ew_thread_t  TidHeart;             /* thread id. was type thread_t on Solaris! */ 
    4343 
    4444/* Other globals 
  • trunk/src/seismic_processing/raypicker/raypicker.c

    r7284 r7775  
    7474#define THREAD_ALIVE 1 
    7575#define THREAD_ERR  -1 
    76 static unsigned tidProcessor;  /* Processor thread id */ 
    77 static unsigned tidStacker;    /* Thread moving messages from InRing */ 
     76static ew_thread_t tidProcessor;  /* Processor thread id */ 
     77static ew_thread_t tidStacker;    /* Thread moving messages from InRing */ 
    7878                               /* to MsgQueue */ 
    79 static unsigned tidStalist;    /* station list thread id */ 
     79static ew_thread_t tidStalist;    /* station list thread id */ 
    8080volatile int MessageStackerStatus = THREAD_ALIVE; /* ALIVE=> Stacker thread ok. ERR => dead */ 
    8181volatile int ProcessorStatus = THREAD_ALIVE;     /* ALIVE=> Processor thread ok. ERR => dead */ 
  • trunk/src/system_control/startstop_nt/startstop.c

    r7542 r7775  
    2424int main( int argc, char *argv[] ) 
    2525{ 
    26    unsigned  stackSize; 
    27    unsigned  tid; 
     26   unsigned     stackSize; 
     27   ew_thread_t  tid; 
    2828   int       p, err; 
    2929   char * tok; 
  • trunk/src/system_control/startstop_service/StartstopPipeConsole/StartstopPipeConsole.c

    r7691 r7775  
    3838  char cmdStr[1024]; 
    3939  DWORD numBytes; 
    40   unsigned tid; 
     40  ew_thread_t tid; 
    4141  static char szNamedPipeBuffer[512]; 
    4242 
Note: See TracChangeset for help on using the changeset viewer.