From e4c2494a74e6c27546c9c0000c1931d615d38c0e Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sun, 22 Nov 2020 14:59:58 +0900 Subject: [PATCH] sched/pthread/pthread_setaffinity.c: Fix a syslog format --- sched/pthread/pthread_setaffinity.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sched/pthread/pthread_setaffinity.c b/sched/pthread/pthread_setaffinity.c index 8c6d4fd4ab..3b8d1c51a2 100644 --- a/sched/pthread/pthread_setaffinity.c +++ b/sched/pthread/pthread_setaffinity.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -69,12 +70,12 @@ int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, { int ret; - sinfo("thread ID=%d cpusetsize=%d cpuset=%p\n", - (int)thread, (int)cpusetsize, cpusetsize); - DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); + sinfo("thread ID=%d cpusetsize=%zu cpuset=%ju\n", + (int)thread, cpusetsize, (uintmax_t)*cpuset); + /* Let nxsched_set_affinity do all of the work, adjusting the return * value. */