From 9e1498ad5b1bb0f57964a979c2220b267ec21535 Mon Sep 17 00:00:00 2001 From: gongchangsui Date: Mon, 24 Nov 2025 22:53:17 -0500 Subject: [PATCH] delete code for kill thread when timeout, and add warning log Signed-off-by: gongchangsui --- trustzone-awared-vm/Host/vtzb_proxy/thread_pool.c | 6 +++--- trustzone-awared-vm/VM/vtzdriver/serialport.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trustzone-awared-vm/Host/vtzb_proxy/thread_pool.c b/trustzone-awared-vm/Host/vtzb_proxy/thread_pool.c index 69cefd0..2c2262c 100644 --- a/trustzone-awared-vm/Host/vtzb_proxy/thread_pool.c +++ b/trustzone-awared-vm/Host/vtzb_proxy/thread_pool.c @@ -186,8 +186,8 @@ void *admin_thread(void *arg) pthread_mutex_lock(&pool->time_mutex); for (i = 0; i < THREAD_POOL_SIZE; i++) { if (g_time_out[i].flag != 0 && (time_sec - g_time_out[i].start_time) > DEFAULT_TIME_SEC) { - kill_open_session_thd(&g_time_out[i]); - g_time_out[i].flag = 0; + tlogw("check tid is %lu, seq_num is %d, it has been doing for %ld seconds.\n", \ + g_time_out[i].tid, g_time_out[i].seq_num, time_sec - g_time_out[i].start_time); } } pthread_mutex_unlock(&pool->time_mutex); @@ -342,4 +342,4 @@ unsigned int get_thread_session_id(ThreadPool *pool, pthread_t thd, unsigned int } pthread_mutex_unlock(&pool->session_mutex); return id; -} \ No newline at end of file +} diff --git a/trustzone-awared-vm/VM/vtzdriver/serialport.c b/trustzone-awared-vm/VM/vtzdriver/serialport.c index 6650180..9b1d2c2 100644 --- a/trustzone-awared-vm/VM/vtzdriver/serialport.c +++ b/trustzone-awared-vm/VM/vtzdriver/serialport.c @@ -742,7 +742,7 @@ int send_to_proxy(void * wrt_buf, size_t size_wrt_buf, void * rd_buf, size_t siz ret = wait_event_interruptible(event_data->wait_event_wq, event_data->ret_flag); if (ret != 0) { - tloge("wait event interruptible failed!, ret = %d\n", ret); + tlogw("wait event interruptible failed!, ret = %d\n", ret); ret = -EINTR; } else { ret = event_data->rd_ret; -- Gitee