1
1
# Copyright (c) 2018 Intel Corporation
2
+ # Copyright (c) 2023 Meta
3
+ #
2
4
# SPDX-License-Identifier: Apache-2.0
3
5
4
- source "lib/posix/getopt/Kconfig"
5
-
6
6
config POSIX_MAX_FDS
7
7
int "Maximum number of open file descriptors"
8
8
default 16 if POSIX_API
@@ -18,144 +18,6 @@ config POSIX_API
18
18
Enable mostly-standards-compliant implementations of
19
19
various POSIX (IEEE 1003.1) APIs.
20
20
21
- config PTHREAD_IPC
22
- bool "POSIX pthread IPC API"
23
- default y if POSIX_API
24
- depends on POSIX_CLOCK
25
- help
26
- This enables a mostly-standards-compliant implementation of
27
- the pthread mutex, condition variable and barrier IPC
28
- mechanisms.
29
-
30
- if PTHREAD_IPC
31
- config MAX_PTHREAD_COUNT
32
- int "Maximum simultaneously active pthread count in POSIX application"
33
- default 5
34
- range 0 255
35
- help
36
- Maximum number of simultaneously active threads in a POSIX application.
37
-
38
- config PTHREAD_CREATE_BARRIER
39
- bool "Use a pthread_barrier_t to serialize pthread_create()"
40
- help
41
- When running several SMP applications in parallel instances of Qemu,
42
- e.g. via twister, explicit serialization may be required between
43
- pthread_create() and zephyr_thread_wrapper() when spawning and joining
44
- many pthreads concurrently.
45
-
46
- On such systems, say Y here to introduce explicit serialization
47
- via pthread_barrier_wait().
48
-
49
- config MAX_PTHREAD_MUTEX_COUNT
50
- int "Maximum simultaneously active mutex count in POSIX application"
51
- default 5
52
- range 0 255
53
- help
54
- Maximum number of simultaneously active mutexes in a POSIX application.
55
-
56
- config MAX_PTHREAD_COND_COUNT
57
- int "Maximum simultaneously active condition variables in a POSIX application"
58
- default 5
59
- range 0 255
60
- help
61
- Maximum number of simultaneously active condition variables in a POSIX application.
62
-
63
- config MAX_PTHREAD_KEY_COUNT
64
- int "Maximum simultaneously active keys in a POSIX application"
65
- default 5
66
- range 0 255
67
- help
68
- Maximum number of simultaneously active keys in a POSIX application.
69
-
70
- config MAX_PTHREAD_BARRIER_COUNT
71
- int "Maximum simultaneously active barriers in a POSIX application"
72
- default 5
73
- range 0 255
74
- help
75
- Maximum number of simultaneously active keys in a POSIX application.
76
-
77
- config MAX_PTHREAD_SPINLOCK_COUNT
78
- int "Maximum simultaneously active spinlocks in a POSIX application"
79
- default 5
80
- range 0 255
81
- help
82
- Maximum number of simultaneously active spinlocks in a POSIX application.
83
-
84
- config SEM_VALUE_MAX
85
- int "Maximum semaphore limit"
86
- default 32767
87
- range 1 32767
88
- help
89
- Maximum semaphore count in POSIX compliant Application.
90
-
91
- endif # PTHREAD_IPC
92
-
93
- config POSIX_CLOCK
94
- bool "POSIX clock, timer, and sleep APIs"
95
- default y if POSIX_API
96
- help
97
- This enables POSIX clock\_\*(), timer\_\*(), and \*sleep()
98
- functions.
99
-
100
- config MAX_TIMER_COUNT
101
- int "Maximum timer count in POSIX application"
102
- default 5
103
- range 0 255
104
- help
105
- Mention maximum number of timers in POSIX compliant application.
106
-
107
- config TIMER_CREATE_WAIT
108
- int "Time to wait for timer availability (in msec) in POSIX application"
109
- default 100
110
- range 0 1000
111
- help
112
- This controls how long to wait for resources to come available to create
113
- a new timer in POSIX compliant application
114
-
115
- config POSIX_MQUEUE
116
- bool "POSIX message queue"
117
- default y if POSIX_API
118
- help
119
- This enabled POSIX message queue related APIs.
120
-
121
- if POSIX_MQUEUE
122
- config MSG_COUNT_MAX
123
- int "Maximum number of messages in message queue"
124
- default 16
125
- help
126
- Mention maximum number of messages in message queue in POSIX compliant
127
- application.
128
-
129
- config MSG_SIZE_MAX
130
- int "Maximum size of a message"
131
- default 16
132
- help
133
- Mention maximum size of message in bytes.
134
-
135
- config MQUEUE_NAMELEN_MAX
136
- int "Maximum size of a name length"
137
- default 16
138
- range 2 255
139
- help
140
- Mention length of message queue name in number of characters.
141
-
142
- endif
143
-
144
- config POSIX_FS
145
- bool "POSIX file system API support"
146
- default y if POSIX_API
147
- depends on FILE_SYSTEM
148
- help
149
- This enables POSIX style file system related APIs.
150
-
151
- config POSIX_MAX_OPEN_FILES
152
- int "Maximum number of open file descriptors"
153
- default 16
154
- depends on POSIX_FS
155
- help
156
- Maximum number of open files. Note that this setting
157
- is additionally bounded by CONFIG_POSIX_MAX_FDS.
158
-
159
21
# The name of this option is mandated by zephyr_interface_library_named
160
22
# cmake directive.
161
23
config APP_LINK_WITH_POSIX_SUBSYS
@@ -165,27 +27,26 @@ config APP_LINK_WITH_POSIX_SUBSYS
165
27
help
166
28
Add POSIX subsystem header files to the 'app' include path.
167
29
168
- config EVENTFD
169
- bool "Support for eventfd"
170
- depends on !NATIVE_APPLICATION
171
- select POLL
30
+ config PTHREAD_IPC
31
+ bool "POSIX pthread IPC API"
172
32
default y if POSIX_API
33
+ depends on POSIX_CLOCK
173
34
help
174
- Enable support for event file descriptors, eventfd. An eventfd can
175
- be used as an event wait/notify mechanism together with POSIX calls
176
- like read, write and poll.
177
-
178
- config EVENTFD_MAX
179
- int "Maximum number of eventfd's"
180
- depends on EVENTFD
181
- default 1
182
- range 1 4096
183
- help
184
- The maximum number of supported event file descriptors.
35
+ This enables a mostly-standards-compliant implementation of
36
+ the pthread mutex, condition variable and barrier IPC
37
+ mechanisms.
185
38
186
- config FNMATCH
187
- bool "Support for fnmatch"
188
- default y if POSIX_API
189
- help
190
- Match filenames using the the fnmatch function. For example, the pattern
191
- "*.c" matches the filename "hello.c".
39
+ source "lib/posix/Kconfig.barrier"
40
+ source "lib/posix/Kconfig.clock"
41
+ source "lib/posix/Kconfig.cond"
42
+ source "lib/posix/Kconfig.eventfd"
43
+ source "lib/posix/Kconfig.fnmatch"
44
+ source "lib/posix/Kconfig.fs"
45
+ source "lib/posix/Kconfig.getopt"
46
+ source "lib/posix/Kconfig.key"
47
+ source "lib/posix/Kconfig.mqueue"
48
+ source "lib/posix/Kconfig.mutex"
49
+ source "lib/posix/Kconfig.pthread"
50
+ source "lib/posix/Kconfig.semaphore"
51
+ source "lib/posix/Kconfig.spinlock"
52
+ source "lib/posix/Kconfig.timer"
0 commit comments