From 020dbe51e3782d72c603344f91736bbad4497d55 Mon Sep 17 00:00:00 2001 From: ouyangxiangzhen Date: Thu, 11 Jul 2024 15:03:52 +0800 Subject: [PATCH] sched/pthread: Add dummy pthread_setaffinity_np This patch added dummy pthread_setaffinity_np implementation if CONFIG_SMP is disabled. Signed-off-by: ouyangxiangzhen --- include/pthread.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/pthread.h b/include/pthread.h index 999af40f1f..e996975c4a 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -586,6 +586,9 @@ int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, FAR const cpu_set_t *cpuset); int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, FAR cpu_set_t *cpuset); +#else +#define pthread_setaffinity_np(...) (-ENOSYS) +#define pthread_getaffinity_np(...) (-ENOSYS) #endif /* Thread-specific Data Interfaces */