19
This commit is contained in:
@@ -428,3 +428,20 @@ void qdx_port_tcp_close(qdx_socket_t sock)
|
||||
ring_init(&ctx->rx_ring);
|
||||
free_sock_ctx(ctx);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* WCHNET global lock — exposed for task_wchnet_entry in main.c
|
||||
* All WCHNET API calls must be serialized through this mutex.
|
||||
* ============================================================ */
|
||||
|
||||
void qdx_port_net_lock(void)
|
||||
{
|
||||
if (g_wchnet_mutex)
|
||||
xSemaphoreTake(g_wchnet_mutex, portMAX_DELAY);
|
||||
}
|
||||
|
||||
void qdx_port_net_unlock(void)
|
||||
{
|
||||
if (g_wchnet_mutex)
|
||||
xSemaphoreGive(g_wchnet_mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user