Changeset 7472


Ignore:
Timestamp:
06/20/18 19:08:45 (9 months ago)
Author:
baker
Message:

fix declaration and return value of Heartbeat thread

Location:
trunk/src/data_sources/q3302ew
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/data_sources/q3302ew/heart.c

    r6803 r7472  
    5151#include "q3302ew.h" 
    5252 
     53#include <signal.h> 
     54#include <stdio.h> 
     55#include <string.h> 
     56#include <sys/types.h> 
     57#include <time.h> 
    5358#ifndef _WINNT 
    5459#include <unistd.h> 
    5560#endif 
    56 #include <signal.h> 
    57 #include <stdio.h> 
    58 #include <sys/types.h> 
    59 #include <string.h> 
     61 
    6062#include "heart.h" 
    6163#include "config.h" 
     
    6567#include "earthworm_simple_funcs.h" 
    6668#include "earthworm.h" 
    67 #include <time.h> 
     69#include "platform.h" 
    6870 
    6971time_t  Heartbeat_lastBeatTime;         /* time stamp since last heartbeat */ 
     
    8385char heart_msg_str[256]; 
    8486 
    85 void *Heartbeat(void *unused_arg) { 
     87thr_ret Heartbeat(void *unused_arg) { 
    8688        time_t now; 
    8789        MyPid = getpid();       /* set it once on entry */ 
     
    99101                 
    100102        } 
    101         return (void *)NULL; 
     103        return THR_NULL_RET; 
    102104} 
    103105 
  • trunk/src/data_sources/q3302ew/heart.h

    r2929 r7472  
    22#define __HEART_H__ 
    33 
     4#include "platform.h" 
     5 
    46void message_send( unsigned char, short, char *); 
    5 void *Heartbeat(void *); 
     7thr_ret Heartbeat( void * ); 
    68 
    79#endif 
  • trunk/src/data_sources/q3302ew/q3302ew.c

    r6803 r7472  
    100100  // start our heartbeat 
    101101  time(&Heartbeat_lastBeatTime); 
    102   StartThread((void (*)(void *))Heartbeat, 8192, &Heartbeat_threadID); 
     102  StartThread( Heartbeat, 8192, &Heartbeat_threadID ); 
    103103 
    104104  // keep trying to register as long as 1) we haven't and 2) we're 
Note: See TracChangeset for help on using the changeset viewer.