1# Copyright (c) 2018 Intel Corporation
2# SPDX-License-Identifier: Apache-2.0
3
4config POSIX_MAX_FDS
5	int "Maximum number of open file descriptors"
6	default 16 if POSIX_API
7	default 4
8	help
9	  Maximum number of open file descriptors, this includes
10	  files, sockets, special devices, etc.
11
12config POSIX_API
13	depends on !ARCH_POSIX
14	bool "POSIX APIs"
15	help
16	  Enable mostly-standards-compliant implementations of
17	  various POSIX (IEEE 1003.1) APIs.
18
19config PTHREAD_IPC
20	bool "POSIX pthread IPC API"
21	default y if POSIX_API
22	depends on POSIX_CLOCK
23	help
24	  This enables a mostly-standards-compliant implementation of
25	  the pthread mutex, condition variable and barrier IPC
26	  mechanisms.
27
28if PTHREAD_IPC
29config MAX_PTHREAD_COUNT
30	int "Maximum simultaneously active pthread count in POSIX application"
31	default 5
32	range 0 255
33	help
34	  Maximum number of simultaneously active threads in a POSIX application.
35
36config SEM_VALUE_MAX
37	int "Maximum semaphore limit"
38	default 32767
39	range 1 32767
40	help
41	  Maximum semaphore count in POSIX compliant Application.
42
43endif # PTHREAD_IPC
44
45config POSIX_CLOCK
46	bool "POSIX clock, timer, and sleep APIs"
47	default y if POSIX_API
48	help
49	  This enables POSIX clock\_\*(), timer\_\*(), and \*sleep()
50	  functions.
51
52config MAX_TIMER_COUNT
53	int "Maximum timer count in POSIX application"
54	default 5
55	range 0 255
56	help
57	  Mention maximum number of timers in POSIX compliant application.
58
59config POSIX_MQUEUE
60	bool "Enable POSIX message queue"
61	default y if POSIX_API
62	help
63	  This enabled POSIX message queue related APIs.
64
65if POSIX_MQUEUE
66config MSG_COUNT_MAX
67	int "Maximum number of messages in message queue"
68	default 16
69	help
70	  Mention maximum number of messages in message queue in POSIX compliant
71	  application.
72
73config MSG_SIZE_MAX
74	int "Maximum size of a message"
75	default 16
76	help
77	  Mention maximum size of message in bytes.
78
79config MQUEUE_NAMELEN_MAX
80	int "Maximum size of a name length"
81	default 16
82	range 2 255
83	help
84	  Mention length of message queue name in number of characters.
85
86endif
87
88config POSIX_FS
89	bool "Enable POSIX file system API support"
90	default y if POSIX_API
91	depends on FILE_SYSTEM
92	help
93	  This enables POSIX style file system related APIs.
94
95config POSIX_MAX_OPEN_FILES
96	int "Maximum number of open file descriptors"
97	default 16
98	depends on POSIX_FS
99	help
100	  Maximum number of open files. Note that this setting
101	  is additionally bounded by CONFIG_POSIX_MAX_FDS.
102
103# The name of this option is mandated by zephyr_interface_library_named
104# cmake directive.
105config APP_LINK_WITH_POSIX_SUBSYS
106	bool "Make POSIX headers available to application"
107	default y
108	depends on POSIX_API
109	help
110	  Add POSIX subsystem header files to the 'app' include path.
111
112config EVENTFD
113	bool "Enable support for eventfd"
114	depends on !ARCH_POSIX
115	select POLL
116	default y if POSIX_API
117	help
118	  Enable support for event file descriptors, eventfd. An eventfd can
119	  be used as an event wait/notify mechanism together with POSIX calls
120	  like read, write and poll.
121
122config EVENTFD_MAX
123	int "Maximum number of eventfd's"
124	depends on EVENTFD
125	default 1
126	range 1 4096
127	help
128	  The maximum number of supported event file descriptors.
129