This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e166360e8d sched: Map both NZERO and PTHREAD_DEFAULT_PRIORITY to
SCHED_PRIORITY_DEFAULT
e166360e8d is described below
commit e166360e8dfc86ba25addc5fd212c1ff1acbcf19
Author: Xiang Xiao <[email protected]>
AuthorDate: Sun Jan 22 01:42:53 2023 +0800
sched: Map both NZERO and PTHREAD_DEFAULT_PRIORITY to SCHED_PRIORITY_DEFAULT
to unify the default thread priority
Signed-off-by: Xiang Xiao <[email protected]>
---
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 4e4e59312f..98b7dc724e 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 639badd12f..d7d01c2c89 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() */