Post · 26 min read· pp. 663–727

POSIX

POSIX

Apache NuttX is not licensed to use the POSIX trademark. NuttX uses the POSIX standard as a development guideline only.

This page summarizes supported POSIX features in NuttX.

POSIX Subprofiles

POSIX PSE51 - Minimal

Units of Functionality Requirements:

[1]

fenv.h related functions not supported.

[2]

In older revisions this was called XSI_THREAD_MUTEX_EXT and some of interfaces was moved from POSIX_THREADS_EXT to POSIX_THREADS_EXT.

POSIX.1 Option Requirements:

[3] (1,2)

NuttX provides dummy implementations for _POSIX_MEMLOCK and _POSIX_MEMLOCK_RANGE which is sufficient for devices without MMU, but doesn’t meet the requirement for devices with MMU.

[4]

Deprecated in new revisions of POSIX. Merged into other base options.

[5] (1,2)

Required only for the development platform. For PSE54 this requirement is also for execution platform which is not supported.

Requirements for Other Standards:

SymbolSupportRemarks
POSIX.26?

POSIX PSE52 - Real-Time Controller

The Realtime Controller System Profile (PSE52) includes all features from PSE51.

Units of Functionality Requirements:

SymbolSupportRemarks
POSIX_C_LANG_MATHYes [6]CONFIG_LIBM_XXX
POSIX_FD_MGMTYes
POSIX_FILE_SYSTEMYes

[6]

NuttX supports different libm implementations with different sets of supported functions. libm support in NuttX is controlled by Kconfig choice option.

POSIX.1 Option Requirements

SymbolSupportRemarks
_POSIX_MAPPED_FILES201712LCONFIG_FS_RAMMAP
_POSIX_MESSAGE_PASSINGYes!CONFIG_DISABLE_MQUEUE
_POSIX_TRACE [7]No
_POSIX_TRACE_EVENT_FILTER [7]No
_POSIX_TRACE_LOG [7]No

[7] (1,2,3)

_POSIX_TRACE* are obsolete.

POSIX PSE53 - Dedicated

The Dedicated Realtime System Profile (PSE53) includes all features from PSE52 and PSE51.

Units of Functionality Requirements:

SymbolSupportRemarks
POSIX_EVENT_MGMT [8]Yes
POSIX_MULTI_PROCESS25/29
POSIX_NETWORKINGYesCONFIG_NET
POSIX_PIPEYesCONFIG_PIPES
POSIX_SIGNAL_JUMPYesCONFIG_ARCH_SETJMP_H

[8]

Deprecated in new revisions of POSIX. Merged into POSIX_DEVICE_IO.

POSIX.1 Option Requirements

[9]

mprotect() changes the page permissions only with CONFIG_ARCH_ADDRENV on arm64 and RISC-V. On other targets it checks the arguments and changes nothing, which is sufficient for devices without MMU.

[10]

A kernel build needs shared memory: CONFIG_FS_SHMFS or CONFIG_MM_SHM.

[11]

CONFIG_SCHED_CRITMONITOR (CPU-time accounting).

POSIX PSE54 - Multipurpose

The Multipurpose Realtime System Profile (PSE54) includes all features from PSE53, PSE52 and PSE51.

Units of Functionality Requirements:

SymbolSupportRemarks
POSIX_C_LANG_WIDE_CHAR
POSIX_DEVICE_SPECIFIC3/15CONFIG_TERMIOS=y
POSIX_FIFOYesCONFIG_DEV_FIFO_SIZE > 0
POSIX_FILE_ATTRIBUTESYesCONFIG_PSEUDOFS_ATTRIBUTES
POSIX_FILE_SYSTEM_EXTYes
POSIX_JOB_CONTROLYesCONFIG_SCHED_PROCESS_GROUPS
POSIX_REGEXPYes
POSIX_SHELL_FUNC3/5
POSIX_STRING_MATCHINGYes
POSIX_SYMBOLIC_LINKSYesCONFIG_FS_LINKS
POSIX_SYSTEM_DATABASEYes
POSIX_USER_GROUPS8/10
POSIX_WIDE_CHAR_IO [12]
XSI_DYNAMIC_LINKINGYes
XSI_SYSTEM_LOGGING1/4

[12]

Deprecated in new revision of POSIX. Moved to POSIX_WIDE_CHAR_DEVICE_IO.

POSIX.1 Option Requirements

Functionality Requirements

POSIX_C_LANG_JUMP

APISupport
longjmp()Yes
setjmp()Yes

POSIX_C_LANG_SUPPORT

APISupport
abs()Yes
asctime()Yes
asctime_r()Yes
atof()Yes
atoi()Yes
atol()Yes
atoll()Yes
bsearch()Yes
calloc()Yes
ctime()Yes
ctime_r()Yes
difftime()Yes
div()Yes
feclearexcept()No
fegetenv()No
fegetexceptflag()No
fegetround()No
feholdexcept()No
feraiseexcept()No
fesetenv()No
fesetexceptflag()No
fesetround()No
fetestexcept()No
feupdateenv()No
free()Yes
gmtime()Yes
gmtime_r()Yes
imaxabs()Yes
imaxdiv()Yes
isalnum()Yes
isalpha()Yes
isblank()Yes
iscntrl()Yes
isdigit()Yes
isgraph()Yes
islower()Yes
isprint()Yes
ispunct()Yes
isspace()Yes
isupper()Yes
isxdigit()Yes
labs()Yes
ldiv()Yes
llabs()Yes
lldiv()Yes
localeconv()Yes
localtime()Yes
localtime_r()Yes
malloc()Yes
memchr()Yes
memcmp()Yes
memcpy()Yes
memmove()Yes
memset()Yes
mktime()Yes
qsort()Yes
rand()Yes
rand_r()Yes
realloc()Yes
setlocale()Yes
snprintf()Yes
sprintf()Yes
srand()Yes
sscanf()Yes
strcat()Yes
strchr()Yes
strcmp()Yes
strcoll()Yes
strcpy()Yes
strcspn()Yes
strerror()Yes
strerror_r()Yes
strftime()Yes
strlen()Yes
strncat()Yes
strncmp()Yes
strncpy()Yes
strpbrk()Yes
strrchr()Yes
strspn()Yes
strstr()Yes
strtod()Yes
strtof()Yes
strtoimax()Yes
strtok()Yes
strtok_r()Yes
strtol()Yes
strtold()Yes
strtoll()Yes
strtoul()Yes
strtoull()Yes
strtoumax()Yes
strxfrm()Yes
time()Yes
tolower()Yes
toupper()Yes
tznameYes
tzset()Yes
va_arg()Yes
va_copy()Yes
va_end()Yes
va_start()Yes
vsnprintf()Yes
vsprintf()Yes
vsscanf()Yes

POSIX_DEVICE_IO

Device Input and Output:

APISupport
FD_CLR()Yes
FD_ISSET()Yes
FD_SET()Yes
FD_ZERO()Yes
clearerr()Yes
close()Yes
fclose()Yes
fdopen()Yes
feof()Yes
ferror()Yes
flush()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
open()Yes
perror()Yes
poll()Yes
posix_close()Yes
ppoll()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
stderrYes
stdinYes
stdoutYes
ungetc()Yes
vfprintf()Yes
vfscanf()Yes
vprintf()Yes
vscanf()Yes
write()Yes

POSIX_FILE_LOCKING

Thread-Safe Stdio Locking:

APISupport
flockfile()Yes
ftrylockfile()Yes
funlockfile()Yes
getc_unlocked()Yes
getchar_unlocked()Yes
putc_unlocked()Yes
putchar_unlocked()Yes

POSIX_SINGLE_PROCESS

Single Process:

APISupport
confstr()Yes
environYes
errnoYes
getenv()Yes
secure_getenv()Yes
setenv()Yes
sysconf()Yes
uname()Yes
unsetenv()Yes

POSIX_THREADS_BASE

Base Threads:

POSIX_THREADS_EXT

Extended Threads:

POSIX_C_LANG_MATH

Depends on the enabled libm implementation [13].

Maths Library:

API
CMPLX()
CMPLXF()
CMPLXL()
acos()
acosf()
acosh()
acoshf()
acoshl()
acosl()
asin()
asinf()
asinh()
asinhf()
asinhl()
asinl()
atan()
atan2()
atan2f()
atan2l()
atanf()
atanh()
atanhf()
atanhl()
atanl()
cabs()
cabsf()
cabsl()
cacos()
cacosf()
cacosh()
cacoshf()
cacoshl()
cacosl()
carg()
cargf()
cargl()
casin()
casinf()
casinh()
casinhf()
casinhl()
casinl()
catan()
catanf()
catanh()
catanhf()
catanhl()
catanl()
cbrt()
cbrtf()
cbrtl()
ccos()
ccosf()
ccosh()
ccoshf()
ccoshl()
ccosl()
ceil()
ceilf()
ceill()
cexp()
cexpf()
cexpl()
cimag()
cimagf()
cimagl()
clog()
clogf()
clogl()
conj()
conjf()
conjl()
copysign()
copysignf()
copysignl()
cos()
cosf()
cosh()
coshf()
coshl()
cosl()
cpow()
cpowf()
cpowl()
cproj()
cprojf()
cprojl()
creal()
crealf()
creall()
csin()
csinf()
csinh()
csinhf()
csinhl()
csinl()
csqrt()
csqrtf()
csqrtl()
ctan()
ctanf()
ctanh()
ctanhf()
ctanhl()
ctanl()
erf()
erfc()
erfcf()
erfcl()
erff()
erfl()
exp()
exp2()
exp2f()
exp2l()
expf()
expl()
expm1()
expm1f()
expm1l()
fabs()
fabsf()
fabsl()
fdim()
fdimf()
fdiml()
floor()
floorf()
floorl()
fma()
fmaf()
fmal()
fmax()
fmaxf()
fmaxl()
fmin()
fminf()
fminl()
fmod()
fmodf()
fmodl()
fpclassify()
frexp()
frexpf()
frexpl()
hypot()
hypotf()
hypotl()
ilogb()
ilogbf()
ilogbl()
isfinite()
isgreater()
isgreaterequal()
isinf()
isless()
islessequal()
islessgreater()
isnan()
isnormal()
isunordered()
ldexp()
ldexpf()
ldexpl()
lgamma()
lgammaf()
lgammal()
llrint()
llrintf()
llrintl()
llround()
llroundf()
llroundl()
log()
log10()
log10f()
log10l()
log1p()
log1pf()
log1pl()
log2()
log2f()
log2l()
logb()
logbf()
logbl()
logf()
logl()
lrint()
lrintf()
lrintl()
lround()
lroundf()
lroundl()
modf()
modff()
modfl()
nan()
nanf()
nanl()
nearbyint()
nearbyintf()
nearbyintl()
nextafter()
nextafterf()
nextafterl()
nexttoward()
nexttowardf()
nexttowardl()
pow()
powf()
powl()
remainder()
remainderf()
remainderl()
remquo()
remquof()
remquol()
rint()
rintf()
rintl()
round()
roundf()
roundl()
scalbln()
scalblnf()
scalblnl()
scalbn()
scalbnf()
scalbnl()
signbit()
sin()
sinf()
sinh()
sinhf()
sinhl()
sinl()
sqrt()
sqrtf()
sqrtl()
tan()
tanf()
tanh()
tanhf()
tanhl()
tanl()
tgamma()
tgammaf()
tgammal()
trunc()
truncf()
truncl()

[13]

NuttX supports different libm implementations with different sets of supported functions. libm support in NuttX is controlled by Kconfig choice option.

POSIX_FD_MGMT

File Descriptor Management:

APISupport
dup()Yes
dup2()Yes
dup3()Yes
fcntl()Yes
fgetpos()Yes
fseek()Yes
fseeko()Yes
fsetpos()Yes
ftell()Yes
ftello()Yes
ftruncate()Yes
lseek()Yes
rewind()Yes

POSIX_FILE_SYSTEM

File System:

chroot() is supported when CONFIG_FS_CHROOT is enabled. See chroot.

APISupport
access()Yes
chdir()Yes
chroot()Yes
closedir()Yes
creat()Yes
fchdir()Yes
fpathconf()Yes
fstat()Yes
fstatvfs()Yes
futimens()Yes
getcwd()Yes
link()Yes
mkdir()Yes
mkostemp()Yes
mkstemp()Yes
opendir()Yes
pathconf()Yes
posix_getdents()No
readdir()Yes
remove()Yes
rename()Yes
rewinddir()Yes
rmdir()Yes
stat()Yes
statvfs()Yes
tmpfile()Yes
tmpnam()Yes
truncate()Yes
unlink()Yes

POSIX_MULTI_PROCESS

Multiple Processes:

APISupport
_Exit()Yes
_Fork()No
_exit()Yes
assert()Yes
at_quick_exit()Yes
atexit()Yes
clock()Yes
execl()Yes
execle()Yes
execlp()Yes
execv()Yes
execve()Yes
execvp()Yes
exit()Yes
fork()Cond.
getpgrp()Yes
getpgid()Yes
getpid()Yes
getppid()Yes
getrlimit()Yes
getsid()Yes
quick_exit()Yes
setrlimit()Yes
setsid()Yes
sleep()Yes
times()Yes
wait()Yes
waitid()Yes
waitpid()Yes

POSIX_NETWORKING

Networking:

APISupport
accept()Yes
accept4()Yes
be16toh()Yes
be32toh()Yes
be64toh()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
htobe16()Yes
htobe32()Yes
htobe64()Yes
htole16()Yes
htole32()Yes
htole64()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
le16toh()Yes
le32toh()Yes
le64toh()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

Pipe:

APISupport
pipe()Yes
pipe2()Yes

POSIX_SIGNAL_JUMP

Signal Jump Functions:

APISupport
siglongjmp()Yes
sigsetjmp()Yes

POSIX_C_LANG_WIDE_CHAR

Wide-Character ISO C Library:

APISupport
btowc()Yes
iswalnum()Yes
iswalpha()Yes
iswblank()Yes
iswcntrl()Yes
iswctype()Yes
iswdigit()Yes
iswgraph()Yes
iswlower()Yes
iswprint()Yes
iswpunct()Yes
iswspace()Yes
iswupper()Yes
iswxdigit()Yes
mblen()Yes
mbrlen()Yes
mbrtowc()Yes
mbsinit()Yes
mbsrtowcs()Yes
mbstowcs()Yes
mbtowc()Yes
swprintf()Yes
swscanf()Yes
towctrans()Yes
towlower()Yes
towupper()Yes
vswprintf()Yes
vswscanf()Yes
wcrtomb()Yes
wcscat()Yes
wcschr()Yes
wcscmp()Yes
wcscoll()Yes
wcscpy()Yes
wcscspn()Yes
wcsftime()Yes
wcslen()Yes
wcsncat()Yes
wcsncmp()Yes
wcsncpy()Yes
wcspbrk()Yes
wcsrchr()Yes
wcsrtombs()Yes
wcsspn()Yes
wcsstr()Yes
wcstod()Yes
wcstof()Yes
wcstoimax()Yes
wcstok()Yes
wcstol()Yes
wcstold()Yes
wcstoll()Yes
wcstombs()Yes
wcstoul()Yes
wcstoull()Yes
wcstoumax()Yes
wcsxfrm()Yes
wctob()Yes
wctomb()Yes
wctrans()Yes
wctype()Yes
wmemchr()Yes
wmemcmp()Yes
wmemcpy()Yes
wmemmove()Yes
wmemset()Yes

POSIX_C_LANG_WIDE_CHAR_EXT

Extended Wide-Character ISO C Library:

APISupport
mbsnrtowcs()Yes
wcpcpy()Yes
wcpncpy()Yes
wcscasecmp()Yes
wcsdup()Yes
wcsncasecmp()Yes
wcsnlen()Yes
wcsnrtombs()Yes

POSIX_DEVICE_SPECIFIC

General Terminal:

APISupport
cfgetispeed()Yes
cfgetospeed()Yes
cfsetispeed()Yes
cfsetospeed()Yes
ctermid()Yes
isatty()Yes
tcdrain()Yes
tcflow()Yes
tcflush()Yes
tcgetattr()Yes
tcgetwinsize()Yes
tcsendbreak()Yes
tcsetattr()Yes
tcsetwinsize()Yes
ttyname()Yes

POSIX_FIFO

FIFO:

APISupport
mkfifo()Yes

POSIX_FILE_ATTRIBUTES

File Attributes:

APISupport
chmod()Yes
chown()Yes
fchmod()Yes
fchown()Yes
umask()Yes

POSIX_FILE_SYSTEM_EXT

File System Extensions:

APISupport
alphasort()Yes
dirfd()Yes
getdelim()Yes
getline()Yes
mkdtemp()Yes
scandir()Yes

POSIX_JOB_CONTROL

Job Control:

APISupport
setpgid()Yes
tcgetpgrp()Yes
tcsetpgrp()Yes
tcgetsid()Yes

POSIX_REGEXP

Regular Expressions:

APISupport
regcomp()Yes
regerror()Yes
regexec()Yes
regfree()Yes

POSIX_SHELL_FUNC

Shell and Utilities:

APISupport
pclose()Yes
popen()Yes
system()Yes
wordexp()No
wordfree()No

POSIX_STRING_MATCHING

APISupport
fnmatch()Yes
getopt()Yes
optargYes
optindYes
opterrYes
optoptYes

Symbolic Links:

APISupport
lchown()Yes
lstat()Yes
readlink()Yes
realpath()Yes
symlink()Yes

POSIX_SYSTEM_DATABASE

System Database:

APISupport
getgrgid()Yes
getgrnam()Yes
getpwnam()Yes
getpwuid()Yes

POSIX_USER_GROUPS

User and Group:

APISupport
getegid()Yes
geteuid()Yes
getgid()Yes
getgroups()Yes
getlogin()Yes
getuid()Yes
setegid()Yes
seteuid()Yes
setgid()Yes
setuid()Yes

POSIX_WIDE_CHAR_DEVICE_IO

Device Input and Output:

APISupport
fgetwc()Yes
fgetws()Yes
fputwc()Yes
fputws()Yes
fwide()Yes
fwprintf()Yes
fwscanf()Yes
getwc()Yes
getwchar()Yes
open_wmemstream()No
putwc()Yes
putwchar()Yes
ungetwc()Yes
vfwprintf()Yes
vfwscanf()Yes
vwprintf()Yes
vwscanf()Yes
wprintf()Yes
wscanf()Yes

XSI_C_LANG_SUPPORT

XSI General C Library:

APISupport
a64l()Yes
daylightYes
drand48()Yes
erand48()Yes
ffs()Yes
ffsl()Yes
ffsll()Yes
getdate()No
hcreate()Yes
hdestroy()Yes
hsearch()Yes
initstate()No
insque()Yes
jrand48()Yes
l64a()Yes
lcong48()Yes
lfind()Yes
lrand48()Yes
lsearch()Yes
memccpy()Yes
mrand48()Yes
nrand48()Yes
random()Yes
remque()Yes
seed48()Yes
setstate()No
signgamNo
srand48()Yes
srandom()Yes
strptime()Yes
swab()Yes
tdelete()Yes
tfind()Yes
timezoneYes
tsearch()Yes
twalk()Yes

XSI_DBM

XSI Database Management:

APISupport
dbm_clearerr()No
dbm_close()No
dbm_delete()No
dbm_error()No
dbm_fetch()No
dbm_firstkey()No
dbm_nextkey()No
dbm_open()No
dbm_store()No

XSI_DEVICE_IO

XSI Device Input and Output:

APISupport
fmtmsg()Yes
readv()Yes
writev()Yes

XSI_DEVICE_SPECIFIC

XSI General Terminal:

APISupport
grantpt()Yes
posix_openpt()Yes
ptsname()Yes
unlockpt()Yes

XSI_DYNAMIC_LINKING

Dynamic Linking:

APISupport
dladdr()Yes
dlclose()Yes
dlerror()Yes
dlopen()Yes
dlsym()Yes

XSI_FD_MGMT

XSI File Descriptor Management:

APISupport
truncate()Yes

XSI_FILE_SYSTEM

XSI File System:

APISupport
basename()Yes
dirname()Yes
lockf()Yes
mknod()Yes
nftw()Yes
seekdir()Yes
sync()Yes
telldir()Yes
utimes()Yes

XSI_I18N

XSI Internationalization:

APISupport
catclose()Yes
catgets()Yes
catopen()Yes
nl_langinfo()Yes

XSI_IPC

XSI Interprocess Communication:

APISupport
ftok()Yes
msgctl()Yes
msgget()Yes
msgrcv()Yes
msgsnd()Yes
semctl()No
semget()No
semop()No
shmat()Yes
shmctl()Yes
shmdt()Yes
shmget()Yes

XSI_JOB_CONTROL

XSI Job Control:

APISupport
tcgetsid()Yes

XSI_JUMP

XSI Jump Functions:

APISupport
_longjmp()Yes
_setjmp()Yes

XSI_MATH

Depends on the enabled libm implementation [14].

XSI Maths Library:

API
j0()
j1()
jn()
scalb()
y0()
y1()
yn()

[14]

NuttX supports different libm implementations with different sets of supported functions. libm support in NuttX is controlled by Kconfig choice option.

XSI_MULTI_PROCESS

XSI Multiple Process:

APISupport
getpgid()Yes
getpriority()Yes
getrlimit()Yes
getrusage()Yes
getsid()Yes
nice()Yes
setpgrp()Yes
setpriority()Yes
setrlimit()Yes
ulimit()No
usleep()Yes
vfork()Cond.
waitid()Yes

XSI_SIGNALS

XSI Signal:

APISupport
bsd_signal()No
killpg()Yes
sigaltstack()Yes
sighold()Yes
sigignore()Yes
siginterrupt()Yes
sigpause()Yes
sigrelse()Yes
sigset()Yes
ualarm()No

XSI_SINGLE_PROCESS

XSI Single Process:

APISupport
gethostid()No
gettimeofday()Yes
putenv()Yes

XSI_SYSTEM_DATABASE

XSI System Database:

APISupport
endpwent()Yes
getpwent()Yes
setpwent()Yes

XSI_SYSTEM_LOGGING

XSI System Logging:

APISupport
closelog()Yes
openlog()Yes
setlogmask()Yes
syslog()Yes

XSI_THREADS_EXT

XSI Threads Extensions:

APISupport
pthread_attr_getstack()Yes
pthread_attr_setstack()Yes
pthread_getconcurrency()Yes
pthread_setconcurrency()Yes

XSI_TIMERS

XSI Timers:

APISupport
getitimer()Yes
setitimer()Yes

ITIMER_VIRTUAL and ITIMER_PROF need CONFIG_SCHED_CRITMONITOR. Both count the CPU time of the process: NuttX does not count the user time and the system time separately.

XSI_USER_GROUPS

XSI User and Group:

APISupport
endgrent()Yes
endutxent()No
getgrent()Yes
getutxent()No
getutxid()No
getutxline()No
pututxline()No
setgrent()Yes
setregid()Yes
setreuid()Yes
setutxent()No

XSI_WIDE_CHAR

XSI Wide-Character Library:

APISupport
wcswidth()Yes
wcwidth()Yes

POSIX.1 Option Requirements

_POSIX_CLOCK_SELECTION

Clock Selection:

APISupport
clock_nanosleep()Yes
pthread_condattr_getclock()Yes
pthread_condattr_setclock()Yes

_POSIX_FSYNC

File Synchronization:

APISupport
fsync() [15]Yes

[15]

Revisit: why #undef  _POSIX_FSYNC in unistd.h ?

_POSIX_IPV6

No functions under this option.

_POSIX_MEMLOCK

APISupport
mlockall()Dummy [16]
munlockall()Dummy [16]

[16] (1,2)

The function returns a success value but doesn’t implement the required functionality.

_POSIX_MEMLOCK_RANGE

APISupport
mlock()Dummy [17]
munlock()Dummy [17]

[17] (1,2)

The function returns a success value but doesn’t implement the required functionality.

_POSIX_MONOTONIC_CLOCK

No functions under this option.

_POSIX_NO_TRUNC

No functions under this option.

_POSIX_REALTIME_SIGNALS

Realtime Signals:

_POSIX_SEMAPHORES

Semaphores:

_POSIX_SHARED_MEMORY_OBJECTS

APISupport
mmap()Yes
munmap()Yes
shm_open()Yes
shm_unling()No

_POSIX_SYNCHRONIZED_IO

APISupport
fdatasync()Yes
fsync()Yes
msync()Yes

_POSIX_THREAD_ATTR_STACKADDR

APISupport
pthread_attr_getstackaddr()Yes
pthread_attr_setstackaddr()Yes

_POSIX_THREAD_ATTR_STACKSIZE

_POSIX_THREAD_CPUTIME

APISupport
CLOCK_THREAD_CPUTIME_IDYes
pthread_getcpuclockid()Yes

_POSIX_THREAD_PRIO_INHERIT

_POSIX_THREAD_PRIO_PROTECT

APISupport
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

_POSIX_THREAD_SPORADIC_SERVER

No functions under this option.

_POSIX_TIMEOUTS

APISupport
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() [18]No

[18]

_POSIX_TRACE* are obsolete.

_POSIX_TIMERS

Depends on !CONFIG_DISABLE_POSIX_TIMERS

Timers:

_POSIX_MAPPED_FILES

Memory Mapped Files:

APISupport
mmap()Yes
munmap()Yes

_POSIX_MESSAGE_PASSING

_POSIX_ASYNCHRONOUS_IO

Depends on CONFIG_FS_AIO.

Asynchronous Input and Output Functions:

APISupport
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_BARRIERS

_POSIX_CPUTIME

APISupport
CLOCK_PROCESS_CPUTIME_IDYes
clock_getcpuclockid()Yes

timer_create() takes the CPU-time clocks of _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME.

_POSIX_MEMORY_PROTECTION

APISupport
mprotect()Yes [19]

[19]

All builds return EINVAL when addr is not a multiple of sysconf(_SC_PAGESIZE) or prot has an unknown bit. With CONFIG_ARCH_ADDRENV on arm64 and RISC-V the function changes the page permissions, and returns ENOMEM when a page of the range is not mapped. Other configurations return a success value for a valid request and change nothing: without an MMU the permissions cannot be enforced.

_POSIX_PRIORITIZED_IO

No functions under this option.

_POSIX_PRIORITY_SCHEDULING

_POSIX_RAW_SOCKETS

No functions under this option.

_POSIX_SPAWN

Depends on CONFIG_BUILD_KERNEL.

_POSIX_SPIN_LOCKS

Depends on CONFIG_PTHREAD_SPINLOCKS. A spin lock is an atomic variable in the memory of the program: the functions need no system call, also in protected and kernel builds. Outside a flat build, the option needs atomic operations that work in user mode (CONFIG_LIBC_ATOMIC_TOOLCHAIN or CONFIG_LIBC_ATOMIC_ARCH). Prefer a mutex: a spin lock only helps on SMP, with very short critical sections.

APISupport
pthread_spin_destroy()Yes
pthread_spin_init()Yes
pthread_spin_lock()Yes
pthread_spin_trylock()Yes
pthread_spin_unlock()Yes

_POSIX_SPORADIC_SERVER

No functions under this option.

_POSIX_THREAD_PROCESS_SHARED

APISupport
pthread_condattr_getpshared()Yes
pthread_condattr_setpshared()Yes
pthread_mutexattr_getpshared()Yes
pthread_mutexattr_setpshared()Yes
pthread_rwlockattr_getpshared()Yes
pthread_rwlockattr_setpshared()Yes
pthread_barrierattr_getpshared()Yes
pthread_barrierattr_setpshared()Yes

_POSIX_ADVISORY_INFO

APISupport
posix_fadvise()Yes
posix_fallocate()Yes
posix_memalign()Yes
posix_madvise()Empty

_POSIX_SAVED_IDS

No functions under this option.

_POSIX_VDISABLE

No functions under this option.

_POSIX2_CHAR_TERM

No utilities under this option.

_POSIX2_FORT_DEV

APISupport
fort77No

_POSIX2_FORT_RUN

APISupport
asaNo

_POSIX2_LOCALEDEF

No utilities under this option.

_POSIX2_PBS

APISupport
qalterNo
qdelNo
qholdNo
qmoveNo
qmsgNo
qrerunNo
qrlsNo
qselectNo
qsigNo
qstatNo
qsubNo

_POSIX2_PBS_ACCOUNTING

No utilities under this option.

_POSIX2_PBS_CHECKPOINT

No utilities under this option.

_POSIX2_PBS_LOCATE

No utilities under this option.

_POSIX2_PBS_MESSAGE

No utilities under this option.

_POSIX2_PBS_TRACK

No utilities under this option.

_POSIX2_UPE

APISupport
nmNo

_XOPEN_CRYPT

Depends on CONFIG_CRYPTO;

APISupport
crypt()Yes
encrypt()No
setkey()No

_XOPEN_ENH_I18N

No interfaces fall under this option.

_XOPEN_LEGACY

APISupport
bcmp()Yes
bcopy()Yes
bzero()Yes
ecvt()No
fcvt()No
ftime()No
gcvt()No
getwd()No
index()No
mktemp()Yes
rindex()Yes
utimes()Yes
wcswcs()Yes

_XOPEN_STREAMS

APISupport
fattach()No
fdetach()No
getmsg()No
getpmsg()No
ioctl()Yes
isastream()No
putmsg()No
putpmsg()No

POSIX_BARRIERS

POSIX_RW_LOCKS

Reader Writer Locks:

APISupport
pthread_rwlock_clockrdlock()Yes
pthread_rwlock_clockwrlock()Yes
pthread_rwlock_destroy()Yes
pthread_rwlock_init()Yes
pthread_rwlock_rdlock()Yes
pthread_rwlock_timedrdlock()Yes
pthread_rwlock_timedwrlock()Yes
pthread_rwlock_tryrdlock()Yes
pthread_rwlock_trywrlock()Yes
pthread_rwlock_unlock()Yes
pthread_rwlock_wrlock()Yes
pthread_rwlockattr_destroy()Yes
pthread_rwlockattr_init()Yes
pthread_rwlockattr_getpshared()Yes
pthread_rwlockattr_setpshared()Yes

_POSIX2_C_DEV

APISupport
c99No
lexNo
yaccNo

_POSIX2_SW_DEV

APISupport
arNo
makeNo
stripNo
nmNo

References