From 5dbac794602eb479404b2c4230b1d11d05cf27ea Mon Sep 17 00:00:00 2001 From: dmtar Date: Wed, 28 May 2025 10:36:46 +0100 Subject: [PATCH] bugfix (pthread_create argument expectation) --- src/cam.c | 2 +- src/cam.h | 2 +- src/cpm.c | 2 +- src/cpm.h | 2 +- src/denm.c | 2 +- src/denm.h | 4 ++-- src/evm.c | 2 +- src/evm.h | 2 +- src/facilities.c | 2 +- src/infrastructure.c | 2 +- src/mcm.c | 2 +- src/mcm.h | 2 +- src/saem.c | 2 +- src/saem.h | 2 +- src/vcm.c | 2 +- src/vcm.h | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/cam.c b/src/cam.c index c1140d2..bc95417 100644 --- a/src/cam.c +++ b/src/cam.c @@ -777,7 +777,7 @@ static int check_pz() { return is_inside; } -void* ca_service() { +void* ca_service(void *arg) { int rv = 0; EIS_NetworkingRequest_t* nr = calloc(1, sizeof(EIS_NetworkingRequest_t)); diff --git a/src/cam.h b/src/cam.h index 441df94..bee2029 100644 --- a/src/cam.h +++ b/src/cam.h @@ -124,6 +124,6 @@ enum CAM_CHECK_R check_cam(EIS_BTPPacketIndication_t* bpi, void* cam, uint8_t* s * * @return NULL */ -void* ca_service(); +void* ca_service(void *arg); #endif diff --git a/src/cpm.c b/src/cpm.c index f7d5cd5..eb1c643 100644 --- a/src/cpm.c +++ b/src/cpm.c @@ -689,7 +689,7 @@ cleanup: return rv; } -void *cp_service(){ +void *cp_service(void *arg){ /* Variables */ int i32_recv_bytes; u_int8_t au8_readBuffer[READ_BUFFER_SIZE]; diff --git a/src/cpm.h b/src/cpm.h index e14e931..160e1a7 100644 --- a/src/cpm.h +++ b/src/cpm.h @@ -182,6 +182,6 @@ Summary: Read from Radar socket (s_socket.i32_socket) call the function to inter param[in] void */ -void* cp_service(); +void* cp_service(void *arg); #endif diff --git a/src/denm.c b/src/denm.c index 5763ddb..10194d9 100644 --- a/src/denm.c +++ b/src/denm.c @@ -454,7 +454,7 @@ int den_init() { return 0; } -void* den_service() { +void* den_service(void *arg) { uint64_t now; diff --git a/src/denm.h b/src/denm.h index 30a391c..826fff7 100644 --- a/src/denm.h +++ b/src/denm.h @@ -70,7 +70,7 @@ typedef struct cc_ssp_bm { */ enum EVENT_CHECK_R event_manage(void* denm, uint64_t* id, uint8_t* ssp, uint32_t ssp_len); -int den_init(); -void* den_service(); +int den_init(void *arg); +void* den_service(void *arg); #endif diff --git a/src/evm.c b/src/evm.c index 30a40bc..8e84e36 100644 --- a/src/evm.c +++ b/src/evm.c @@ -373,7 +373,7 @@ enum EVM_CHECK_R check_evrsrm(EIS_BTPPacketIndication_t *bpi, EI1_EV_RSR_t *evrs return 0; } -void *evcsn_service() { +void *evcsn_service(void *arg) { int rv = 0; EIS_NetworkingRequest_t* nr = calloc(1, sizeof(EIS_NetworkingRequest_t)); diff --git a/src/evm.h b/src/evm.h index b818b68..566c1ef 100644 --- a/src/evm.h +++ b/src/evm.h @@ -36,7 +36,7 @@ enum EVM_CHECK_R check_evrsrm(EIS_BTPPacketIndication_t *bpi, EI1_EV_RSR_t *evrs * * @return NULL */ -void *evcsn_service(); +void *evcsn_service(void *arg); /** * @brief Creates a EVCSNM response and sends it diff --git a/src/facilities.c b/src/facilities.c index 90a4d9c..f9e8b54 100644 --- a/src/facilities.c +++ b/src/facilities.c @@ -284,7 +284,7 @@ cleanup: return rv; } -void *tx() { +void *tx(void *arg) { int rv = 0; itss_queue_t *queue = facilities.tx_queue; diff --git a/src/infrastructure.c b/src/infrastructure.c index dc3dde5..d3a94bb 100644 --- a/src/infrastructure.c +++ b/src/infrastructure.c @@ -512,7 +512,7 @@ int infrastructure_init() { return 0; } -void* infrastructure_service() { +void* infrastructure_service(void *arg) { struct timespec systemtime; uint64_t now; diff --git a/src/mcm.c b/src/mcm.c index 8eef267..d478dac 100644 --- a/src/mcm.c +++ b/src/mcm.c @@ -170,7 +170,7 @@ cleanup: return rv; } -void *mc_service(){ +void *mc_service(void *arg){ int rv; mcm_coord_t *mcm_coord = (mcm_coord_t *)&facilities.mcm_coord; diff --git a/src/mcm.h b/src/mcm.h index 390f39d..e77b84c 100644 --- a/src/mcm.h +++ b/src/mcm.h @@ -17,7 +17,7 @@ typedef struct mcm_coord { pthread_mutex_t lock; } mcm_coord_t; -void* mc_service(); +void* mc_service(void *arg); void mcm_coord_init(); #endif diff --git a/src/saem.c b/src/saem.c index 44be3b5..dae8bc8 100644 --- a/src/saem.c +++ b/src/saem.c @@ -296,7 +296,7 @@ cleanup: return rv; } -void *sa_service() { +void *sa_service(void *arg) { pthread_mutex_init(&facilities.bulletin.lock, NULL); diff --git a/src/saem.h b/src/saem.h index 57e1f8d..97cc00b 100644 --- a/src/saem.h +++ b/src/saem.h @@ -76,4 +76,4 @@ SAEM_CODE_R saem_check(EI1_SAEM_t* saem, uint8_t* neighbour); * * @return NULL */ -void* sa_service(); +void* sa_service(void *arg); diff --git a/src/vcm.c b/src/vcm.c index 4017235..6fa288e 100644 --- a/src/vcm.c +++ b/src/vcm.c @@ -1189,7 +1189,7 @@ static bool vcm_timer_check(coordination_t* coordination, uint64_t now) { return send; } -void* vc_service() { +void* vc_service(void *arg) { coordination_t* coordination = (coordination_t*) &facilities.coordination; diff --git a/src/vcm.h b/src/vcm.h index 5b34f48..0255cb0 100644 --- a/src/vcm.h +++ b/src/vcm.h @@ -101,7 +101,7 @@ int vcm_check(EI1_VCM_t* vcm); * VC loop, threaded * @return NULL */ -void* vc_service(); +void* vc_service(void *arg); /** * Initializes the main VC struct