Skip to content

Commit d6edc75

Browse files
Nicholas Lowellkartben
authored andcommitted
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 <Nicholas.Lowell@lexmark.com>
1 parent 833eacc commit d6edc75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/zephyr/posix/posix_features.h

Lines changed: 3 additions & 0 deletions
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)
@@ -286,6 +287,7 @@ __PICOLIBC_MINOR__ == 8 && __PICOLIBC_PATCHLEVEL__ >= 9)))
286287
#define _POSIX_SIGQUEUE_MAX (32)
287288
#define _POSIX_SSIZE_MAX (32767)
288289
#define _POSIX_SS_REPL_MAX (4)
290+
#define _POSIX_STACK_MIN (K_KERNEL_STACK_LEN(0))
289291
#define _POSIX_STREAM_MAX (8)
290292
#define _POSIX_SYMLINK_MAX (255)
291293
#define _POSIX_SYMLOOP_MAX (8)
@@ -343,6 +345,7 @@ __PICOLIBC_MINOR__ == 8 && __PICOLIBC_PATCHLEVEL__ >= 9)))
343345
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
344346
#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
345347
#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX
348+
#define PTHREAD_STACK_MIN _POSIX_STACK_MIN
346349
#define RTSIG_MAX _POSIX_RTSIG_MAX
347350
#define SEM_NSEMS_MAX _POSIX_SEM_NSEMS_MAX
348351
#define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX

include/zephyr/posix/pthread.h

Lines changed: 0 additions & 3 deletions
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)