From 65552b777e8ad4a184957aa286b025892fdf668c Mon Sep 17 00:00:00 2001 From: Luo Xiaogang Date: Tue, 7 Sep 2021 19:11:41 +0800 Subject: [PATCH] osal_thread: set thread fun return type to void* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 和 posix 规范不兼容, 导致编译失败。修改为和 posix 规范一致。 bug: https://gitee.com/openharmony/drivers_framework/issues/I491XY?from=project-issue Signed-off-by: Luo Xiaogang --- core/adapter/syscall/src/hdf_syscall_adapter.c | 2 +- include/osal/osal_thread.h | 2 +- 2 files 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 2759120dc..91b03d50e 100644 --- a/core/adapter/syscall/src/hdf_syscall_adapter.c +++ b/core/adapter/syscall/src/hdf_syscall_adapter.c @@ -211,7 +211,7 @@ static int32_t AssignPfds(struct HdfDevListenerThread *thread, struct pollfd **p } #define POLL_WAIT_TIME_MS 100 -static int32_t HdfDevEventListenTask(void *para) +static void* HdfDevEventListenTask(void *para) { struct HdfDevListenerThread *thread = (struct HdfDevListenerThread *)para; struct pollfd *pfds = NULL; diff --git a/include/osal/osal_thread.h b/include/osal/osal_thread.h index 136783e10..c17ce9f82 100644 --- a/include/osal/osal_thread.h +++ b/include/osal/osal_thread.h @@ -71,7 +71,7 @@ struct OsalThreadParam { * @since 1.0 * @version 1.0 */ -typedef int (*OsalThreadEntry)(void *); +typedef void* (*OsalThreadEntry)(void *); /** * @brief Describes a thread. -- Gitee