From e166360e8dfc86ba25addc5fd212c1ff1acbcf19 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 22 Jan 2023 01:42:53 +0800 Subject: [PATCH] sched: Map both NZERO and PTHREAD_DEFAULT_PRIORITY to SCHED_PRIORITY_DEFAULT to unify the default thread priority Signed-off-by: Xiang Xiao --- include/limits.h | 4 ++-- include/pthread.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/limits.h b/include/limits.h index 4e4e59312f2..98b7dc724e1 100644 --- a/include/limits.h +++ b/include/limits.h @@ -281,10 +281,10 @@ #define NL_TEXTMAX _POSIX2_LINE_MAX /* NZERO - * Default process priority. Minimum Acceptable Value: 128 + * Default process priority. Minimum Acceptable Value: 100 */ -#define NZERO 128 +#define NZERO SCHED_PRIORITY_DEFAULT /* Required for asynchronous I/O */ diff --git a/include/pthread.h b/include/pthread.h index 639badd12f1..d7d01c2c89f 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -117,7 +117,7 @@ /* Default priority */ -#define PTHREAD_DEFAULT_PRIORITY 100 +#define PTHREAD_DEFAULT_PRIORITY SCHED_PRIORITY_DEFAULT /* Cancellation states used by pthread_setcancelstate() */