From 595470823424fcb4ed653a10880e49109f4cefbf Mon Sep 17 00:00:00 2001 From: marcfir Date: Tue, 12 Mar 2024 13:57:22 +0100 Subject: [PATCH] fix(build_so): Make anon_cb an explicit function in dc.c --- src/dc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/dc.c b/src/dc.c index 344f911..0e6aa8b 100644 --- a/src/dc.c +++ b/src/dc.c @@ -58,6 +58,12 @@ #define ONE_SEC ((osal_uint64_t)1000000000u) +static void anon_cb(struct ec *cb_pec, pool_entry_t *cb_p_entry, ec_datagram_t *cb_p_dg) { + (void)cb_pec; + (void)cb_p_dg; + osal_binary_semaphore_post(&cb_p_entry->p_idx->waiter); +}; + // mesaure packet duration (important in case of master_as_ref_clock !) static inline osal_uint64_t get_packet_duration(ec_t *pec) { assert(pec != NULL); @@ -86,12 +92,7 @@ static inline osal_uint64_t get_packet_duration(ec_t *pec) { p_dg->irq = 0; p_entry->p_idx = p_idx; - p_entry->user_cb = ({ - void anon_cb(struct ec *cb_pec, pool_entry_t *cb_p_entry, ec_datagram_t *cb_p_dg) { - (void)cb_pec; - (void)cb_p_dg; - osal_binary_semaphore_post(&cb_p_entry->p_idx->waiter); - } &anon_cb; }); + p_entry->user_cb = anon_cb; // queue frame and trigger tx pool_put(&pec->hw.tx_high, p_entry);