From 9817d6c8ae773f71f38c6d275a6ce09a306c3670 Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Fri, 6 Aug 2021 15:55:04 +0800 Subject: [PATCH] solve the problem of endless loop --- core/adapter/syscall/src/hdf_syscall_adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/adapter/syscall/src/hdf_syscall_adapter.c b/core/adapter/syscall/src/hdf_syscall_adapter.c index d84ea8634..7b3fc9ba6 100644 --- a/core/adapter/syscall/src/hdf_syscall_adapter.c +++ b/core/adapter/syscall/src/hdf_syscall_adapter.c @@ -608,8 +608,8 @@ static void HdfDevListenerThreadDestroy(struct HdfDevListenerThread *thread) HDF_LOGE("%s:failed to exit listener thread with ioctl, will go async way", __func__); return; } - while (thread->status != LISTENER_EXITED) { - OsalUSleep(1); + if (thread->status != LISTENER_EXITED) { + OsalUSleep(100); } HDF_LOGI("poll thread exited"); HdfDevListenerThreadFree(thread); -- Gitee