sched/pthread: Add dummy pthread_setaffinity_np

This patch added dummy pthread_setaffinity_np implementation if CONFIG_SMP is disabled.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2024-07-11 15:03:52 +08:00 committed by Xiang Xiao
parent 28d943b226
commit 020dbe51e3
1 changed files with 3 additions and 0 deletions

View File

@ -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 */