POSIX Option and Option Group Details
POSIX Option Groups
POSIX_BARRIERS
Enable this option group with CONFIG_POSIX_BARRIERS
.
API |
Supported |
---|---|
pthread_barrier_destroy() |
yes |
pthread_barrier_init() |
yes |
pthread_barrier_wait() |
yes |
pthread_barrierattr_destroy() |
yes |
pthread_barrierattr_init() |
yes |
POSIX_C_LANG_JUMP
The POSIX_C_LANG_JUMP
Option Group is included in the ISO C standard.
Note
When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the
POSIX_C_LANG_JUMP
Option Group is considered supported.
API |
Supported |
---|---|
setjmp() |
yes |
longjmp() |
yes |
POSIX_C_LANG_MATH
The POSIX_C_LANG_MATH
Option Group is included in the ISO C standard.
Note
When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the
POSIX_C_LANG_MATH
Option Group is considered supported.
Please refer to Subprofiling Considerations for details on the POSIX_C_LANG_MATH
Option
Group.
POSIX_C_LANG_SUPPORT
The POSIX_C_LANG_SUPPORT option group contains the general ISO C Library.
Note
When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the entire
POSIX_C_LANG_SUPPORT
Option Group is considered supported.
Please refer to Subprofiling Considerations for details on the POSIX_C_LANG_SUPPORT
Option
Group.
For more information on developing Zephyr applications in the C programming language, please refer to details.
POSIX_C_LIB_EXT
Enable this option group with CONFIG_POSIX_C_LIB_EXT
.
API |
Supported |
---|---|
fnmatch() |
yes |
getopt() |
yes |
getsubopt() |
|
optarg |
yes |
opterr |
yes |
optind |
yes |
optopt |
yes |
stpcpy() |
|
stpncpy() |
|
strcasecmp() |
|
strdup() |
|
strfmon() |
|
strncasecmp() |
yes |
strndup() |
|
strnlen() |
yes |
POSIX_CLOCK_SELECTION
Enable this option group with CONFIG_POSIX_CLOCK_SELECTION
.
API |
Supported |
---|---|
pthread_condattr_getclock() |
yes |
pthread_condattr_setclock() |
yes |
clock_nanosleep() |
yes |
POSIX_DEVICE_IO
Enable this option group with CONFIG_POSIX_DEVICE_IO
.
Note
When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the
C89 components of the POSIX_DEVICE_IO
Option Group are considered supported.
API |
Supported |
---|---|
FD_CLR() |
yes |
FD_ISSET() |
yes |
FD_SET() |
yes |
FD_ZERO() |
yes |
clearerr() |
yes |
close() |
yes |
fclose() |
yes |
fdopen() |
yes |
feof() |
yes |
ferror() |
yes |
fflush() |
yes |
fgetc() |
yes |
fgets() |
yes |
fileno() |
yes |
fopen() |
yes |
fprintf() |
yes |
fputc() |
yes |
fputs() |
yes |
fread() |
yes |
freopen() |
yes |
fscanf() |
yes |
fwrite() |
yes |
getc() |
yes |
getchar() |
yes |
gets() |
yes |
open() |
yes |
perror() |
yes |
poll() |
yes |
printf() |
yes |
pread() |
yes |
pselect() |
yes |
putc() |
yes |
putchar() |
yes |
puts() |
yes |
pwrite() |
yes |
read() |
yes |
scanf() |
yes |
select() |
yes |
setbuf() |
yes |
setvbuf() |
yes |
stderr |
yes |
stdin |
yes |
stdout |
yes |
ungetc() |
yes |
vfprintf() |
yes |
vfscanf() |
yes |
vprintf() |
yes |
vscanf() |
yes |
write() |
yes |
POSIX_FD_MGMT
Enable this option group with CONFIG_POSIX_FD_MGMT
.
API |
Supported |
---|---|
dup() |
|
dup2() |
|
fcntl() |
|
fgetpos() |
|
fseek() |
|
fseeko() |
|
fsetpos() |
|
ftell() |
|
ftello() |
|
ftruncate() |
yes |
lseek() |
|
rewind() |
POSIX_FILE_LOCKING
API |
Supported |
---|---|
flockfile() |
|
ftrylockfile() |
|
funlockfile() |
|
getc_unlocked() |
|
getchar_unlocked() |
|
putc_unlocked() |
|
putchar_unlocked() |
POSIX_FILE_SYSTEM
Enable this option group with CONFIG_POSIX_FILE_SYSTEM
.
API |
Supported |
---|---|
access() |
|
chdir() |
|
closedir() |
yes |
creat() |
|
fchdir() |
|
fpathconf() |
|
fstat() |
yes |
fstatvfs() |
|
getcwd() |
|
link() |
|
mkdir() |
yes |
mkstemp() |
|
opendir() |
yes |
pathconf() |
|
readdir() |
yes |
remove() |
yes |
rename() |
yes |
rewinddir() |
|
rmdir() |
yes |
stat() |
yes |
statvfs() |
|
tmpfile() |
|
tmpnam() |
|
truncate() |
|
unlink() |
yes |
utime() |
POSIX_FILE_SYSTEM_R
Enable this option with CONFIG_POSIX_FILE_SYSTEM_R
.
API |
Supported |
---|---|
readdir_r() |
yes |
POSIX_MAPPED_FILES
Enable this option group with CONFIG_POSIX_MAPPED_FILES
.
API |
Supported |
---|---|
mmap() |
yes |
msync() |
yes |
munmap() |
yes |
POSIX_MEMORY_PROTECTION
Enable this option group with CONFIG_POSIX_MEMORY_PROTECTION
.
API |
Supported |
---|---|
mprotect() |
yes † |
POSIX_MULTI_PROCESS
Enable this option group with CONFIG_POSIX_MULTI_PROCESS
.
API |
Supported |
---|---|
_Exit() |
yes |
_exit() |
yes |
assert() |
yes |
atexit() |
|
clock() |
|
execl() |
|
execle() |
|
execlp() |
|
execv() |
|
execve() |
|
execvp() |
|
exit() |
yes |
fork() |
|
getpgrp() |
|
getpgid() |
|
getpid() |
yes † |
getppid() |
|
getsid() |
|
setsid() |
|
sleep() |
yes |
times() |
|
wait() |
|
waitid() |
|
waitpid() |
POSIX_NETWORKING
The function sockatmark()
is not yet supported and is expected to fail setting errno
to ENOSYS
†.
Enable this option group with CONFIG_POSIX_NETWORKING
.
API |
Supported |
---|---|
accept() |
yes |
bind() |
yes |
connect() |
yes |
endhostent() |
yes |
endnetent() |
yes |
endprotoent() |
yes |
endservent() |
yes |
freeaddrinfo() |
yes |
gai_strerror() |
yes |
getaddrinfo() |
yes |
gethostent() |
yes |
gethostname() |
yes |
getnameinfo() |
yes |
getnetbyaddr() |
yes |
getnetbyname() |
yes |
getnetent() |
yes |
getpeername() |
yes |
getprotobyname() |
yes |
getprotobynumber() |
yes |
getprotoent() |
yes |
getservbyname() |
yes |
getservbyport() |
yes |
getservent() |
yes |
getsockname() |
yes |
getsockopt() |
yes |
htonl() |
yes |
htons() |
yes |
if_freenameindex() |
yes |
if_indextoname() |
yes |
if_nameindex() |
yes |
if_nametoindex() |
yes |
inet_addr() |
yes |
inet_ntoa() |
yes |
inet_ntop() |
yes |
inet_pton() |
yes |
listen() |
yes |
ntohl() |
yes |
ntohs() |
yes |
recv() |
yes |
recvfrom() |
yes |
recvmsg() |
yes |
send() |
yes |
sendmsg() |
yes |
sendto() |
yes |
sethostent() |
yes |
setnetent() |
yes |
setprotoent() |
yes |
setservent() |
yes |
setsockopt() |
yes |
shutdown() |
yes |
socket() |
yes |
sockatmark() |
yes † |
socketpair() |
yes |
POSIX_PIPE
API |
Supported |
---|---|
pipe() |
POSIX_REALTIME_SIGNALS
Enable this option group with CONFIG_POSIX_REALTIME_SIGNALS
.
API |
Supported |
---|---|
sigqueue() |
|
sigtimedwait() |
|
sigwaitinfo() |
POSIX_SEMAPHORES
Enable this option group with CONFIG_POSIX_SEMAPHORES
.
API |
Supported |
---|---|
sem_close() |
yes |
sem_destroy() |
yes |
sem_getvalue() |
yes |
sem_init() |
yes |
sem_open() |
yes |
sem_post() |
yes |
sem_trywait() |
yes |
sem_unlink() |
yes |
sem_wait() |
yes |
POSIX_SIGNAL_JUMP
API |
Supported |
---|---|
siglongjmp() |
|
sigsetjmp() |
POSIX_SIGNALS
Enable this option group with CONFIG_POSIX_SIGNALS
.
Note
As processes are not yet supported in Zephyr, the ISO C functions abort()
, signal()
,
and raise()
, as well as the other POSIX functions listed below, may exhibit undefined
behaviour. The POSIX functions kill()
, pause()
, sigaction()
, sigpending()
,
sigsuspend()
, and sigwait()
are implemented to ensure that conformant applications can
link, but they are expected to fail, setting errno to ENOSYS
†.
API |
Supported |
---|---|
abort() |
yes † |
alarm() |
yes † |
kill() |
yes † |
pause() |
yes † |
raise() |
yes † |
sigaction() |
yes † |
sigaddset() |
yes |
sigdelset() |
yes |
sigemptyset() |
yes |
sigfillset() |
yes |
sigismember() |
yes |
signal() |
yes † |
sigpending() |
yes † |
sigprocmask() |
yes |
sigsuspend() |
yes † |
sigwait() |
yes † |
strsignal() |
yes |
POSIX_SINGLE_PROCESS
The POSIX_SINGLE_PROCESS option group contains services for single process applications.
Enable this option group with CONFIG_POSIX_SINGLE_PROCESS
.
API |
Supported |
---|---|
confstr() |
yes |
environ |
yes |
errno |
yes |
getenv() |
yes |
setenv() |
yes |
sysconf() |
yes |
uname() |
yes |
unsetenv() |
yes |
POSIX_SPIN_LOCKS
Enable this option group with CONFIG_POSIX_SPIN_LOCKS
.
API |
Supported |
---|---|
pthread_spin_destroy() |
yes |
pthread_spin_init() |
yes |
pthread_spin_lock() |
yes |
pthread_spin_trylock() |
yes |
pthread_spin_unlock() |
yes |
POSIX_THREADS_BASE
The basic assumption in this profile is that the system consists of a single (implicit) process with multiple threads. Therefore, the standard requires all basic thread services, except those related to multiple processes.
Enable this option group with CONFIG_POSIX_THREADS
.
API |
Supported |
---|---|
pthread_atfork() |
yes |
pthread_attr_destroy() |
yes |
pthread_attr_getdetachstate() |
yes |
pthread_attr_getschedparam() |
yes |
pthread_attr_init() |
yes |
pthread_attr_setdetachstate() |
yes |
pthread_attr_setschedparam() |
yes |
pthread_barrier_destroy() |
yes |
pthread_barrier_init() |
yes |
pthread_barrier_wait() |
yes |
pthread_barrierattr_destroy() |
yes |
pthread_barrierattr_getpshared() |
yes |
pthread_barrierattr_init() |
yes |
pthread_barrierattr_setpshared() |
yes |
pthread_cancel() |
yes |
pthread_cleanup_pop() |
yes |
pthread_cleanup_push() |
yes |
pthread_cond_broadcast() |
yes |
pthread_cond_destroy() |
yes |
pthread_cond_init() |
yes |
pthread_cond_signal() |
yes |
pthread_cond_timedwait() |
yes |
pthread_cond_wait() |
yes |
pthread_condattr_destroy() |
yes |
pthread_condattr_init() |
yes |
pthread_create() |
yes |
pthread_detach() |
yes |
pthread_equal() |
yes |
pthread_exit() |
yes |
pthread_getspecific() |
yes |
pthread_join() |
yes |
pthread_key_create() |
yes |
pthread_key_delete() |
yes |
pthread_kill() |
|
pthread_mutex_destroy() |
yes |
pthread_mutex_init() |
yes |
pthread_mutex_lock() |
yes |
pthread_mutex_trylock() |
yes |
pthread_mutex_unlock() |
yes |
pthread_mutexattr_destroy() |
yes |
pthread_mutexattr_init() |
yes |
pthread_once() |
yes |
pthread_self() |
yes |
pthread_setcancelstate() |
yes |
pthread_setcanceltype() |
yes |
pthread_setspecific() |
yes |
pthread_sigmask() |
yes |
pthread_testcancel() |
yes |
POSIX_THREADS_EXT
Enable this option group with CONFIG_POSIX_THREADS_EXT
.
API |
Supported |
---|---|
pthread_attr_getguardsize() |
yes |
pthread_attr_setguardsize() |
yes |
pthread_mutexattr_gettype() |
yes |
pthread_mutexattr_settype() |
yes |
POSIX_TIMERS
Enable this option group with CONFIG_POSIX_TIMERS
.
API |
Supported |
---|---|
clock_getres() |
yes |
clock_gettime() |
yes |
clock_settime() |
yes |
nanosleep() |
yes |
timer_create() |
yes |
timer_delete() |
yes |
timer_gettime() |
yes |
timer_getoverrun() |
yes |
timer_settime() |
yes |
XSI_SYSTEM_LOGGING
Enable this option group with CONFIG_XSI_SYSTEM_LOGGING
.
API |
Supported |
---|---|
closelog() |
yes |
openlog() |
yes |
setlogmask() |
yes |
syslog() |
yes |
XSI_THREADS_EXT
The XSI_THREADS_EXT option group is required because it provides functions to control a thread’s stack. This is considered useful for any real-time application.
Enable this option group with CONFIG_XSI_THREADS_EXT
.
API |
Supported |
---|---|
pthread_attr_getstack() |
yes |
pthread_attr_setstack() |
yes |
pthread_getconcurrency() |
yes |
pthread_setconcurrency() |
yes |
POSIX Options
_POSIX_ASYNCHRONOUS_IO
Functions part of the _POSIX_ASYNCHRONOUS_IO
Option are not implemented in Zephyr but are
provided so that conformant applications can still link. These functions will fail, setting
errno
to ENOSYS
†.
Enable this option with CONFIG_POSIX_ASYNCHRONOUS_IO
.
API |
Supported |
---|---|
aio_cancel() |
yes † |
aio_error() |
yes † |
aio_fsync() |
yes † |
aio_read() |
yes † |
aio_return() |
yes † |
aio_suspend() |
yes † |
aio_write() |
yes † |
lio_listio() |
yes † |
_POSIX_CPUTIME
Enable this option with CONFIG_POSIX_CPUTIME
.
API |
Supported |
---|---|
CLOCK_PROCESS_CPUTIME_ID |
yes |
_POSIX_FSYNC
Enable this option with CONFIG_POSIX_FSYNC
.
API |
Supported |
---|---|
fsync() |
yes |
_POSIX_IPV6
Internet Protocol Version 6 is supported.
For more information, please refer to Networking.
Enable this option with CONFIG_POSIX_IPV6
.
_POSIX_MEMLOCK
Zephyr’s Demand Paging API does not yet support
pinning or unpinning all virtual memory regions. The functions below are expected to fail and
set errno
to ENOSYS
†.
Enable this option with CONFIG_POSIX_MEMLOCK
.
API |
Supported |
---|---|
mlockall() |
yes |
munlockall() |
yes |
_POSIX_MEMLOCK_RANGE
Enable this option with CONFIG_POSIX_MEMLOCK_RANGE
.
API |
Supported |
---|---|
mlock() |
yes |
munlock() |
yes |
_POSIX_MESSAGE_PASSING
Enable this option with CONFIG_POSIX_MESSAGE_PASSING
.
API |
Supported |
---|---|
mq_close() |
yes |
mq_getattr() |
yes |
mq_notify() |
yes |
mq_open() |
yes |
mq_receive() |
yes |
mq_send() |
yes |
mq_setattr() |
yes |
mq_unlink() |
yes |
_POSIX_MONOTONIC_CLOCK
Enable this option with CONFIG_POSIX_MONOTONIC_CLOCK
.
API |
Supported |
---|---|
CLOCK_MONOTONIC |
yes |
_POSIX_PRIORITY_SCHEDULING
As processes are not yet supported in Zephyr, the functions sched_rr_get_interval()
,
sched_setparam()
, and sched_setscheduler()
are expected to fail setting errno
to ENOSYS
†.
Enable this option with CONFIG_POSIX_PRIORITY_SCHEDULING
.
API |
Supported |
---|---|
sched_get_priority_max() |
yes |
sched_get_priority_min() |
yes |
sched_getparam() |
yes |
sched_getscheduler() |
yes |
sched_rr_get_interval() |
yes † |
sched_setparam() |
yes † |
sched_setscheduler() |
yes † |
sched_yield() |
yes |
_POSIX_RAW_SOCKETS
Raw sockets are supported.
For more information, please refer to CONFIG_NET_SOCKETS_PACKET
.
Enable this option with CONFIG_POSIX_RAW_SOCKETS
.
_POSIX_READER_WRITER_LOCKS
Enable this option with CONFIG_POSIX_READER_WRITER_LOCKS
.
API |
Supported |
---|---|
pthread_rwlock_destroy() |
yes |
pthread_rwlock_init() |
yes |
pthread_rwlock_rdlock() |
yes |
pthread_rwlock_tryrdlock() |
yes |
pthread_rwlock_trywrlock() |
yes |
pthread_rwlock_unlock() |
yes |
pthread_rwlock_wrlock() |
yes |
pthread_rwlockattr_destroy() |
yes |
pthread_rwlockattr_getpshared() |
yes |
pthread_rwlockattr_init() |
yes |
pthread_rwlockattr_setpshared() |
yes |
_POSIX_SYNCHRONIZED_IO
Enable this option with CONFIG_POSIX_SYNCHRONIZED_IO
.
API |
Supported |
---|---|
fdatasync() |
yes |
fsync() |
yes |
msync() |
yes |
_POSIX_THREAD_ATTR_STACKADDR
Enable this option with CONFIG_POSIX_THREAD_ATTR_STACKADDR
.
API |
Supported |
---|---|
pthread_attr_getstackaddr() |
yes |
pthread_attr_setstackaddr() |
yes |
_POSIX_THREAD_ATTR_STACKSIZE
Enable this option with CONFIG_POSIX_THREAD_ATTR_STACKSIZE
.
API |
Supported |
---|---|
pthread_attr_getstacksize() |
yes |
pthread_attr_setstacksize() |
yes |
_POSIX_THREAD_CPUTIME
Enable this option with CONFIG_POSIX_THREAD_CPUTIME
.
API |
Supported |
---|---|
CLOCK_THREAD_CPUTIME_ID |
yes |
pthread_getcpuclockid() |
yes |
_POSIX_THREAD_PRIO_INHERIT
Enable this option with CONFIG_POSIX_THREAD_PRIO_INHERIT
.
API |
Supported |
---|---|
pthread_mutexattr_getprotocol() |
yes |
pthread_mutexattr_setprotocol() |
yes |
_POSIX_THREAD_PRIO_PROTECT
Enable this option with CONFIG_POSIX_THREAD_PRIO_PROTECT
.
API |
Supported |
---|---|
pthread_mutex_getprioceiling() |
yes |
pthread_mutex_setprioceiling() |
yes |
pthread_mutexattr_getprioceiling() |
yes |
pthread_mutexattr_getprotocol() |
yes |
pthread_mutexattr_setprioceiling() |
yes |
pthread_mutexattr_setprotocol() |
yes |
_POSIX_THREAD_PRIORITY_SCHEDULING
Enable this option with CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING
.
API |
Supported |
---|---|
pthread_attr_getinheritsched() |
yes |
pthread_attr_getschedpolicy() |
yes |
pthread_attr_getscope() |
yes |
pthread_attr_setinheritsched() |
yes |
pthread_attr_setschedpolicy() |
yes |
pthread_attr_setscope() |
yes |
pthread_getschedparam() |
yes |
pthread_setschedparam() |
yes |
pthread_setschedprio() |
yes |
_POSIX_THREAD_SAFE_FUNCTIONS
Enable this option with CONFIG_POSIX_THREAD_SAFE_FUNCTIONS
.
API |
Supported |
---|---|
asctime_r() |
yes |
ctime_r() |
yes (UTC timezone only) |
flockfile() |
|
ftrylockfile() |
|
funlockfile() |
|
getc_unlocked() |
|
getchar_unlocked() |
|
getgrgid_r() |
yes † |
getgrnam_r() |
yes † |
getpwnam_r() |
yes † |
getpwuid_r() |
yes † |
gmtime_r() |
yes |
localtime_r() |
yes (UTC timezone only) |
putc_unlocked() |
|
putchar_unlocked() |
|
rand_r() |
yes |
readdir_r() |
yes |
strerror_r() |
yes |
strtok_r() |
yes |
_POSIX_TIMEOUTS
Enable this option with CONFIG_POSIX_TIMEOUTS
.
API |
Supported |
---|---|
mq_timedreceive() |
yes |
mq_timedsend() |
yes |
pthread_mutex_timedlock() |
yes |
pthread_rwlock_timedrdlock() |
yes |
pthread_rwlock_timedwrlock() |
yes |
sem_timedwait() |
yes |
posix_trace_timedgetnext_event() |
_XOPEN_STREAMS
With the exception of ioctl()
, functions in the _XOPEN_STREAMS
option group are not
implemented in Zephyr but are provided so that conformant applications can still link.
Unimplemented functions in this option group will fail, setting errno
to ENOSYS
†.
Enable this option with CONFIG_XOPEN_STREAMS
.
API |
Supported |
---|---|
fattach() |
yes † |
fdetach() |
yes † |
getmsg() |
yes † |
getpmsg() |
yes † |
ioctl() |
yes |
isastream() |
yes † |
putmsg() |
yes † |
putpmsg() |
yes † |