-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
posix: split supported features into separate Kconfig files
This change is setting up for switching over to proper POSIX option requirements, feature test macros, and a dependency structure that is reflective of the standard. Signed-off-by: Christopher Friedt <cfriedt@meta.com>
- Loading branch information
Showing
18 changed files
with
260 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD_BARRIER | ||
type = pthread_barrier_t | ||
type-function = pthread_barrier_wait | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" | ||
|
||
if PTHREAD_BARRIER | ||
|
||
config PTHREAD_CREATE_BARRIER | ||
bool "Use a pthread_barrier_t to serialize pthread_create()" | ||
help | ||
When running several SMP applications in parallel instances of Qemu, | ||
e.g. via twister, explicit serialization may be required between | ||
pthread_create() and zephyr_thread_wrapper() when spawning and joining | ||
many pthreads concurrently. | ||
|
||
On such systems, say Y here to introduce explicit serialization | ||
via pthread_barrier_wait(). | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2018 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config POSIX_CLOCK | ||
bool "POSIX clock, timer, and sleep APIs" | ||
default y if POSIX_API | ||
help | ||
This enables POSIX clock\_\*(), timer\_\*(), and \*sleep() | ||
functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD_COND | ||
type = pthread_cond_t | ||
type-function = pthread_cond_wait | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config EVENTFD | ||
bool "Support for eventfd" | ||
depends on !NATIVE_APPLICATION | ||
select POLL | ||
default y if POSIX_API | ||
help | ||
Enable support for event file descriptors, eventfd. An eventfd can | ||
be used as an event wait/notify mechanism together with POSIX calls | ||
like read, write and poll. | ||
|
||
config EVENTFD_MAX | ||
int "Maximum number of eventfd's" | ||
depends on EVENTFD | ||
default 1 | ||
range 1 4096 | ||
help | ||
The maximum number of supported event file descriptors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2018 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config FNMATCH | ||
bool "Support for fnmatch" | ||
default y if POSIX_API | ||
help | ||
Match filenames using the the fnmatch function. For example, the pattern | ||
"*.c" matches the filename "hello.c". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2018 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config POSIX_FS | ||
bool "POSIX file system API support" | ||
default y if POSIX_API | ||
depends on FILE_SYSTEM | ||
help | ||
This enables POSIX style file system related APIs. | ||
|
||
config POSIX_MAX_OPEN_FILES | ||
int "Maximum number of open file descriptors" | ||
default 16 | ||
depends on POSIX_FS | ||
help | ||
Maximum number of open files. Note that this setting | ||
is additionally bounded by CONFIG_POSIX_MAX_FDS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source "lib/posix/getopt/Kconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2018 Intel Corporation | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD_KEY | ||
type = pthread_key_t | ||
type-function = pthread_setspecific | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config POSIX_MQUEUE | ||
bool "POSIX message queue" | ||
default y if POSIX_API | ||
help | ||
This enabled POSIX message queue related APIs. | ||
|
||
if POSIX_MQUEUE | ||
|
||
config MSG_COUNT_MAX | ||
int "Maximum number of messages in message queue" | ||
default 16 | ||
help | ||
Mention maximum number of messages in message queue in POSIX compliant | ||
application. | ||
|
||
config MSG_SIZE_MAX | ||
int "Maximum size of a message" | ||
default 16 | ||
help | ||
Mention maximum size of message in bytes. | ||
|
||
config MQUEUE_NAMELEN_MAX | ||
int "Maximum size of a name length" | ||
default 16 | ||
range 2 255 | ||
help | ||
Mention length of message queue name in number of characters. | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD_MUTEX | ||
type = pthread_mutex_t | ||
type-function = pthread_mutex_lock | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2017 Intel Corporation | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD | ||
type = pthread_t | ||
type-function = pthread_create | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2018 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SEM_VALUE_MAX | ||
int "Maximum semaphore limit" | ||
default 32767 | ||
range 1 32767 | ||
help | ||
Maximum semaphore count in POSIX compliant Application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2023 Meta | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
TYPE = PTHREAD_SPINLOCK | ||
type = pthread_spinlock_t | ||
type-function = pthread_spin_lock | ||
source "lib/posix/Kconfig.template.pooled_ipc_type" |
Oops, something went wrong.