Skip to content

Commit f39668d

Browse files
Nicholas LowellNicholas Lowell
Nicholas Lowell
authored and
Nicholas Lowell
committed
posix: move PTHREAD_STACK_MIN to posix_features
PTHREAD_STACK_MIN is one of the very few posix features referenced in sysconf that is not defined in posix_features.h Move it to minimize header dependencies. Signed-off-by: Nicholas Lowell <[email protected]>
1 parent 8cec9f7 commit f39668d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/zephyr/posix/posix_features.h

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <zephyr/autoconf.h> /* CONFIG_* */
1212
#include <zephyr/sys/util_macro.h> /* COND_CODE_1() */
13+
#include <zephyr/kernel/thread_stack.h> /* K_KERNEL_STACK_LEN() */
1314

1415
/*
1516
* POSIX Application Environment Profiles (AEP - IEEE Std 1003.13-2003)
@@ -279,6 +280,7 @@
279280
#define _POSIX_SIGQUEUE_MAX (32)
280281
#define _POSIX_SSIZE_MAX (32767)
281282
#define _POSIX_SS_REPL_MAX (4)
283+
#define _POSIX_STACK_MIN (K_KERNEL_STACK_LEN(0))
282284
#define _POSIX_STREAM_MAX (8)
283285
#define _POSIX_SYMLINK_MAX (255)
284286
#define _POSIX_SYMLOOP_MAX (8)
@@ -334,6 +336,7 @@
334336
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
335337
#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
336338
#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX
339+
#define PTHREAD_STACK_MIN _POSIX_STACK_MIN
337340
#define RTSIG_MAX _POSIX_RTSIG_MAX
338341
#define SEM_NSEMS_MAX _POSIX_SEM_NSEMS_MAX
339342
#define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX

include/zephyr/posix/pthread.h

-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ extern "C" {
5454
/* Passed to pthread_once */
5555
#define PTHREAD_ONCE_INIT {0}
5656

57-
/* The minimum allowable stack size */
58-
#define PTHREAD_STACK_MIN K_KERNEL_STACK_LEN(0)
59-
6057
/**
6158
* @brief Declare a condition variable as initialized
6259
*

0 commit comments

Comments
 (0)