1POSIX Option and Option Group Details 2##################################### 3 4.. _posix_option_groups: 5 6POSIX Option Groups 7=================== 8 9.. _posix_option_group_barriers: 10 11POSIX_BARRIERS 12++++++++++++++ 13 14Enable this option group with :kconfig:option:`CONFIG_POSIX_BARRIERS`. 15 16.. csv-table:: POSIX_BARRIERS 17 :header: API, Supported 18 :widths: 50,10 19 20 pthread_barrier_destroy(),yes 21 pthread_barrier_init(),yes 22 pthread_barrier_wait(),yes 23 pthread_barrierattr_destroy(),yes 24 pthread_barrierattr_init(),yes 25 26.. _posix_option_group_c_lang_jump: 27 28POSIX_C_LANG_JUMP 29+++++++++++++++++ 30 31The ``POSIX_C_LANG_JUMP`` Option Group is included in the ISO C standard. 32 33.. note:: 34 When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the 35 ``POSIX_C_LANG_JUMP`` Option Group is considered supported. 36 37.. csv-table:: POSIX_C_LANG_JUMP 38 :header: API, Supported 39 :widths: 50,10 40 41 setjmp(), yes 42 longjmp(), yes 43 44.. _posix_option_group_c_lang_math: 45 46POSIX_C_LANG_MATH 47+++++++++++++++++ 48 49The ``POSIX_C_LANG_MATH`` Option Group is included in the ISO C standard. 50 51.. note:: 52 When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the 53 ``POSIX_C_LANG_MATH`` Option Group is considered supported. 54 55Please refer to `Subprofiling Considerations`_ for details on the ``POSIX_C_LANG_MATH`` Option 56Group. 57 58.. _posix_option_group_c_lang_support: 59 60POSIX_C_LANG_SUPPORT 61++++++++++++++++++++ 62 63The POSIX_C_LANG_SUPPORT option group contains the general ISO C Library. 64 65.. note:: 66 When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the entire 67 ``POSIX_C_LANG_SUPPORT`` Option Group is considered supported. 68 69Please refer to `Subprofiling Considerations`_ for details on the ``POSIX_C_LANG_SUPPORT`` Option 70Group. 71 72For more information on developing Zephyr applications in the C programming language, please refer 73to :ref:`details<language_support>`. 74 75.. _posix_option_group_c_lang_support_r: 76 77POSIX_C_LANG_SUPPORT_R 78++++++++++++++++++++++ 79 80Enable this option group with :kconfig:option:`CONFIG_POSIX_C_LANG_SUPPORT_R`. 81 82.. csv-table:: POSIX_C_LANG_SUPPORT_R 83 :header: API, Supported 84 :widths: 50,10 85 86 asctime_r(),yes 87 ctime_r(),yes 88 gmtime_r(),yes 89 localtime_r(),yes 90 rand_r(),yes 91 strerror_r(),yes 92 strtok_r(),yes 93 94.. _posix_option_group_c_lib_ext: 95 96POSIX_C_LIB_EXT 97+++++++++++++++ 98 99Enable this option group with :kconfig:option:`CONFIG_POSIX_C_LIB_EXT`. 100 101.. csv-table:: POSIX_C_LIB_EXT 102 :header: API, Supported 103 :widths: 50,10 104 105 fnmatch(), yes 106 getopt(), yes 107 getsubopt(), 108 optarg, yes 109 opterr, yes 110 optind, yes 111 optopt, yes 112 stpcpy(), 113 stpncpy(), 114 strcasecmp(), 115 strdup(), 116 strfmon(), 117 strncasecmp(), yes 118 strndup(), 119 strnlen(), yes 120 121.. _posix_option_group_clock_selection: 122 123POSIX_CLOCK_SELECTION 124+++++++++++++++++++++ 125 126Enable this option group with :kconfig:option:`CONFIG_POSIX_CLOCK_SELECTION`. 127 128.. csv-table:: POSIX_CLOCK_SELECTION 129 :header: API, Supported 130 :widths: 50,10 131 132 pthread_condattr_getclock(),yes 133 pthread_condattr_setclock(),yes 134 clock_nanosleep(),yes 135 136.. _posix_option_group_device_io: 137 138POSIX_DEVICE_IO 139+++++++++++++++ 140 141Enable this option group with :kconfig:option:`CONFIG_POSIX_DEVICE_IO`. 142 143.. note:: 144 When using Newlib, Picolibc, or other C libraries conforming to the ISO C Standard, the 145 C89 components of the ``POSIX_DEVICE_IO`` Option Group are considered supported. 146 147.. csv-table:: POSIX_DEVICE_IO 148 :header: API, Supported 149 :widths: 50,10 150 151 FD_CLR(),yes 152 FD_ISSET(),yes 153 FD_SET(),yes 154 FD_ZERO(),yes 155 clearerr(),yes 156 close(),yes 157 fclose(),yes 158 fdopen(),yes 159 feof(),yes 160 ferror(),yes 161 fflush(),yes 162 fgetc(),yes 163 fgets(),yes 164 fileno(),yes 165 fopen(),yes 166 fprintf(),yes 167 fputc(),yes 168 fputs(),yes 169 fread(),yes 170 freopen(),yes 171 fscanf(),yes 172 fwrite(),yes 173 getc(),yes 174 getchar(),yes 175 gets(),yes 176 open(),yes 177 perror(),yes 178 poll(),yes 179 printf(),yes 180 pread(),yes 181 pselect(),yes 182 putc(),yes 183 putchar(),yes 184 puts(),yes 185 pwrite(),yes 186 read(),yes 187 scanf(),yes 188 select(),yes 189 setbuf(),yes 190 setvbuf(),yes 191 stderr,yes 192 stdin,yes 193 stdout,yes 194 ungetc(),yes 195 vfprintf(),yes 196 vfscanf(),yes 197 vprintf(),yes 198 vscanf(),yes 199 write(),yes 200 201.. _posix_option_group_fd_mgmt: 202 203POSIX_FD_MGMT 204+++++++++++++ 205 206Enable this option group with :kconfig:option:`CONFIG_POSIX_FD_MGMT`. 207 208.. csv-table:: POSIX_FD_MGMT 209 :header: API, Supported 210 :widths: 50,10 211 212 dup(), 213 dup2(), 214 fcntl(), 215 fgetpos(), 216 fseek(), 217 fseeko(), 218 fsetpos(), 219 ftell(), 220 ftello(), 221 ftruncate(),yes 222 lseek(), 223 rewind(), 224 225.. _posix_option_group_file_locking: 226 227POSIX_FILE_LOCKING 228++++++++++++++++++ 229 230.. csv-table:: POSIX_FILE_LOCKING 231 :header: API, Supported 232 :widths: 50,10 233 234 flockfile(), 235 ftrylockfile(), 236 funlockfile(), 237 getc_unlocked(), 238 getchar_unlocked(), 239 putc_unlocked(), 240 putchar_unlocked(), 241 242.. _posix_option_group_file_system: 243 244POSIX_FILE_SYSTEM 245+++++++++++++++++ 246 247Enable this option group with :kconfig:option:`CONFIG_POSIX_FILE_SYSTEM`. 248 249.. csv-table:: POSIX_FILE_SYSTEM 250 :header: API, Supported 251 :widths: 50,10 252 253 access(), 254 chdir(), 255 closedir(), yes 256 creat(), 257 fchdir(), 258 fpathconf(), 259 fstat(), yes 260 fstatvfs(), 261 getcwd(), 262 link(), 263 mkdir(), yes 264 mkstemp(), 265 opendir(), yes 266 pathconf(), 267 readdir(), yes 268 remove(), yes 269 rename(), yes 270 rewinddir(), 271 rmdir(), yes 272 stat(), yes 273 statvfs(), 274 tmpfile(), 275 tmpnam(), 276 truncate(), 277 unlink(), yes 278 utime(), 279 280.. _posix_option_group_file_system_r: 281 282POSIX_FILE_SYSTEM_R 283+++++++++++++++++++ 284 285Enable this option with :kconfig:option:`CONFIG_POSIX_FILE_SYSTEM_R`. 286 287.. csv-table:: POSIX_FILE_SYSTEM_R 288 :header: API, Supported 289 :widths: 50,10 290 291 readdir_r(), yes 292 293.. _posix_option_group_mapped_files: 294 295POSIX_MAPPED_FILES 296++++++++++++++++++ 297 298Enable this option group with :kconfig:option:`CONFIG_POSIX_MAPPED_FILES`. 299 300.. csv-table:: POSIX_MAPPED_FILES 301 :header: API, Supported 302 :widths: 50,10 303 304 mmap(),yes 305 msync(),yes 306 munmap(),yes 307 308.. _posix_option_group_memory_protection: 309 310POSIX_MEMORY_PROTECTION 311+++++++++++++++++++++++ 312 313Enable this option group with :kconfig:option:`CONFIG_POSIX_MEMORY_PROTECTION`. 314 315.. csv-table:: POSIX_MEMORY_PROTECTION 316 :header: API, Supported 317 :widths: 50,10 318 319 mprotect(), yes :ref:`†<posix_undefined_behaviour>` 320 321.. _posix_option_group_multi_process: 322 323POSIX_MULTI_PROCESS 324+++++++++++++++++++ 325 326Enable this option group with :kconfig:option:`CONFIG_POSIX_MULTI_PROCESS`. 327 328.. csv-table:: POSIX_MULTI_PROCESS 329 :header: API, Supported 330 :widths: 50,10 331 332 _Exit(), yes 333 _exit(), yes 334 assert(), yes 335 atexit(),:ref:`†<posix_undefined_behaviour>` 336 clock(), 337 execl(),:ref:`†<posix_undefined_behaviour>` 338 execle(),:ref:`†<posix_undefined_behaviour>` 339 execlp(),:ref:`†<posix_undefined_behaviour>` 340 execv(),:ref:`†<posix_undefined_behaviour>` 341 execve(),:ref:`†<posix_undefined_behaviour>` 342 execvp(),:ref:`†<posix_undefined_behaviour>` 343 exit(), yes 344 fork(),:ref:`†<posix_undefined_behaviour>` 345 getpgrp(),:ref:`†<posix_undefined_behaviour>` 346 getpgid(),:ref:`†<posix_undefined_behaviour>` 347 getpid(), yes :ref:`†<posix_undefined_behaviour>` 348 getppid(),:ref:`†<posix_undefined_behaviour>` 349 getsid(),:ref:`†<posix_undefined_behaviour>` 350 setsid(),:ref:`†<posix_undefined_behaviour>` 351 sleep(),yes 352 times(), 353 wait(),:ref:`†<posix_undefined_behaviour>` 354 waitid(),:ref:`†<posix_undefined_behaviour>` 355 waitpid(),:ref:`†<posix_undefined_behaviour>` 356 357.. _posix_option_group_networking: 358 359POSIX_NETWORKING 360++++++++++++++++ 361 362The function ``sockatmark()`` is not yet supported and is expected to fail setting ``errno`` 363to ``ENOSYS`` :ref:`†<posix_undefined_behaviour>`. 364 365Enable this option group with :kconfig:option:`CONFIG_POSIX_NETWORKING`. 366 367.. csv-table:: POSIX_NETWORKING 368 :header: API, Supported 369 :widths: 50,10 370 371 accept(),yes 372 bind(),yes 373 connect(),yes 374 endhostent(),yes 375 endnetent(),yes 376 endprotoent(),yes 377 endservent(),yes 378 freeaddrinfo(),yes 379 gai_strerror(),yes 380 getaddrinfo(),yes 381 gethostent(),yes 382 gethostname(),yes 383 getnameinfo(),yes 384 getnetbyaddr(),yes 385 getnetbyname(),yes 386 getnetent(),yes 387 getpeername(),yes 388 getprotobyname(),yes 389 getprotobynumber(),yes 390 getprotoent(),yes 391 getservbyname(),yes 392 getservbyport(),yes 393 getservent(),yes 394 getsockname(),yes 395 getsockopt(),yes 396 htonl(),yes 397 htons(),yes 398 if_freenameindex(),yes 399 if_indextoname(),yes 400 if_nameindex(),yes 401 if_nametoindex(),yes 402 inet_addr(),yes 403 inet_ntoa(),yes 404 inet_ntop(),yes 405 inet_pton(),yes 406 listen(),yes 407 ntohl(),yes 408 ntohs(),yes 409 recv(),yes 410 recvfrom(),yes 411 recvmsg(),yes 412 send(),yes 413 sendmsg(),yes 414 sendto(),yes 415 sethostent(),yes 416 setnetent(),yes 417 setprotoent(),yes 418 setservent(),yes 419 setsockopt(),yes 420 shutdown(),yes 421 socket(),yes 422 sockatmark(),yes :ref:`†<posix_undefined_behaviour>` 423 socketpair(),yes 424 425.. _posix_option_group_pipe: 426 427POSIX_PIPE 428++++++++++ 429 430.. csv-table:: POSIX_PIPE 431 :header: API, Supported 432 :widths: 50,10 433 434 pipe(), 435 436.. _posix_option_group_realtime_signals: 437 438POSIX_REALTIME_SIGNALS 439++++++++++++++++++++++ 440 441Enable this option group with :kconfig:option:`CONFIG_POSIX_REALTIME_SIGNALS`. 442 443.. csv-table:: POSIX_REALTIME_SIGNALS 444 :header: API, Supported 445 :widths: 50,10 446 447 sigqueue(), 448 sigtimedwait(), 449 sigwaitinfo(), 450 451.. _posix_option_group_semaphores: 452 453POSIX_SEMAPHORES 454++++++++++++++++ 455 456Enable this option group with :kconfig:option:`CONFIG_POSIX_SEMAPHORES`. 457 458.. csv-table:: POSIX_SEMAPHORES 459 :header: API, Supported 460 :widths: 50,10 461 462 sem_close(),yes 463 sem_destroy(),yes 464 sem_getvalue(),yes 465 sem_init(),yes 466 sem_open(),yes 467 sem_post(),yes 468 sem_trywait(),yes 469 sem_unlink(),yes 470 sem_wait(),yes 471 472.. _posix_option_group_signal_jump: 473 474POSIX_SIGNAL_JUMP 475+++++++++++++++++ 476 477.. csv-table:: POSIX_SIGNAL_JUMP 478 :header: API, Supported 479 :widths: 50,10 480 481 siglongjmp(), 482 sigsetjmp(), 483 484.. _posix_option_group_signals: 485 486POSIX_SIGNALS 487+++++++++++++ 488 489Enable this option group with :kconfig:option:`CONFIG_POSIX_SIGNALS`. 490 491.. note:: 492 As processes are not yet supported in Zephyr, the ISO C functions ``abort()``, ``signal()``, 493 and ``raise()``, as well as the other POSIX functions listed below, may exhibit undefined 494 behaviour. The POSIX functions ``kill()``, ``pause()``, ``sigaction()``, ``sigpending()``, 495 ``sigsuspend()``, and ``sigwait()`` are implemented to ensure that conformant applications can 496 link, but they are expected to fail, setting errno to ``ENOSYS`` 497 :ref:`†<posix_undefined_behaviour>`. 498 499.. csv-table:: POSIX_SIGNALS 500 :header: API, Supported 501 :widths: 50,10 502 503 abort(),yes :ref:`†<posix_undefined_behaviour>` 504 alarm(),yes :ref:`†<posix_undefined_behaviour>` 505 kill(),yes :ref:`†<posix_undefined_behaviour>` 506 pause(),yes :ref:`†<posix_undefined_behaviour>` 507 raise(),yes :ref:`†<posix_undefined_behaviour>` 508 sigaction(),yes :ref:`†<posix_undefined_behaviour>` 509 sigaddset(),yes 510 sigdelset(),yes 511 sigemptyset(),yes 512 sigfillset(),yes 513 sigismember(),yes 514 signal(),yes :ref:`†<posix_undefined_behaviour>` 515 sigpending(),yes :ref:`†<posix_undefined_behaviour>` 516 sigprocmask(),yes 517 sigsuspend(),yes :ref:`†<posix_undefined_behaviour>` 518 sigwait(),yes :ref:`†<posix_undefined_behaviour>` 519 strsignal(),yes 520 521.. _posix_option_group_single_process: 522 523POSIX_SINGLE_PROCESS 524++++++++++++++++++++ 525 526The POSIX_SINGLE_PROCESS option group contains services for single 527process applications. 528 529Enable this option group with :kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`. 530 531.. csv-table:: POSIX_SINGLE_PROCESS 532 :header: API, Supported 533 :widths: 50,10 534 535 confstr(),yes 536 environ,yes 537 errno,yes 538 getenv(),yes 539 setenv(),yes 540 sysconf(),yes 541 uname(),yes 542 unsetenv(),yes 543 544.. _posix_option_group_spin_locks: 545 546POSIX_SPIN_LOCKS 547++++++++++++++++ 548 549Enable this option group with :kconfig:option:`CONFIG_POSIX_SPIN_LOCKS`. 550 551.. csv-table:: POSIX_SPIN_LOCKS 552 :header: API, Supported 553 :widths: 50,10 554 555 pthread_spin_destroy(),yes 556 pthread_spin_init(),yes 557 pthread_spin_lock(),yes 558 pthread_spin_trylock(),yes 559 pthread_spin_unlock(),yes 560 561.. _posix_option_group_threads_base: 562 563POSIX_THREADS_BASE 564++++++++++++++++++ 565 566The basic assumption in this profile is that the system 567consists of a single (implicit) process with multiple threads. Therefore, the 568standard requires all basic thread services, except those related to 569multiple processes. 570 571Enable this option group with :kconfig:option:`CONFIG_POSIX_THREADS`. 572 573.. csv-table:: POSIX_THREADS_BASE 574 :header: API, Supported 575 :widths: 50,10 576 577 pthread_atfork(),yes 578 pthread_attr_destroy(),yes 579 pthread_attr_getdetachstate(),yes 580 pthread_attr_getschedparam(),yes 581 pthread_attr_init(),yes 582 pthread_attr_setdetachstate(),yes 583 pthread_attr_setschedparam(),yes 584 pthread_barrier_destroy(),yes 585 pthread_barrier_init(),yes 586 pthread_barrier_wait(),yes 587 pthread_barrierattr_destroy(),yes 588 pthread_barrierattr_getpshared(),yes 589 pthread_barrierattr_init(),yes 590 pthread_barrierattr_setpshared(),yes 591 pthread_cancel(),yes 592 pthread_cleanup_pop(),yes 593 pthread_cleanup_push(),yes 594 pthread_cond_broadcast(),yes 595 pthread_cond_destroy(),yes 596 pthread_cond_init(),yes 597 pthread_cond_signal(),yes 598 pthread_cond_timedwait(),yes 599 pthread_cond_wait(),yes 600 pthread_condattr_destroy(),yes 601 pthread_condattr_init(),yes 602 pthread_create(),yes 603 pthread_detach(),yes 604 pthread_equal(),yes 605 pthread_exit(),yes 606 pthread_getspecific(),yes 607 pthread_join(),yes 608 pthread_key_create(),yes 609 pthread_key_delete(),yes 610 pthread_kill(), 611 pthread_mutex_destroy(),yes 612 pthread_mutex_init(),yes 613 pthread_mutex_lock(),yes 614 pthread_mutex_trylock(),yes 615 pthread_mutex_unlock(),yes 616 pthread_mutexattr_destroy(),yes 617 pthread_mutexattr_init(),yes 618 pthread_once(),yes 619 pthread_self(),yes 620 pthread_setcancelstate(),yes 621 pthread_setcanceltype(),yes 622 pthread_setspecific(),yes 623 pthread_sigmask(),yes 624 pthread_testcancel(),yes 625 626.. _posix_option_group_posix_threads_ext: 627 628POSIX_THREADS_EXT 629+++++++++++++++++ 630 631Enable this option group with :kconfig:option:`CONFIG_POSIX_THREADS_EXT`. 632 633.. csv-table:: POSIX_THREADS_EXT 634 :header: API, Supported 635 :widths: 50,10 636 637 pthread_attr_getguardsize(),yes 638 pthread_attr_setguardsize(),yes 639 pthread_mutexattr_gettype(),yes 640 pthread_mutexattr_settype(),yes 641 642.. _posix_option_group_timers: 643 644POSIX_TIMERS 645++++++++++++ 646 647Enable this option group with :kconfig:option:`CONFIG_POSIX_TIMERS`. 648 649.. csv-table:: POSIX_TIMERS 650 :header: API, Supported 651 :widths: 50,10 652 653 clock_getres(),yes 654 clock_gettime(),yes 655 clock_settime(),yes 656 nanosleep(),yes 657 timer_create(),yes 658 timer_delete(),yes 659 timer_gettime(),yes 660 timer_getoverrun(),yes 661 timer_settime(),yes 662 663.. _posix_option_group_xsi_realtime: 664 665XSI_REALTIME 666++++++++++++ 667 668The ``XSI_REALTIME`` option group indicates that the :ref:`_POSIX_FSYNC<posix_option_fsync>`, 669:ref:`_POSIX_MEMLOCK<posix_option_memlock>`, 670:ref:`_POSIX_MEMLOCK_RANGE<posix_option_memlock_range>`, 671:ref:`_POSIX_MESSAGE_PASSING<posix_option_message_passing>`, 672:ref:`_POSIX_PRIORITY_SCHEDULING<posix_option_priority_scheduling>`, 673:ref:`_POSIX_SHARED_MEMORY_OBJECTS<posix_option_shared_memory_objects>`, and 674:ref:`_POSIX_SYNCHRONIZED_IO<posix_option_synchronized_io>` options are enabled. 675 676Enable this option group with :kconfig:option:`CONFIG_XSI_REALTIME`. 677 678When this option group is enabled, the ``_XOPEN_REALTIME`` feature test macro will be defined to a 679value other than -1. 680 681.. _posix_option_group_xsi_single_process: 682 683XSI_SINGLE_PROCESS 684++++++++++++++++++ 685 686Enable this option group with :kconfig:option:`CONFIG_XSI_SINGLE_PROCESS`. 687 688.. csv-table:: XSI_SINGLE_PROCESS 689 :header: API, Supported 690 :widths: 50,10 691 692 gethostid(),yes 693 gettimeofday(),yes 694 putenv(),yes 695 696.. _posix_option_group_xsi_system_logging: 697 698XSI_SYSTEM_LOGGING 699++++++++++++++++++ 700 701Enable this option group with :kconfig:option:`CONFIG_XSI_SYSTEM_LOGGING`. 702 703.. csv-table:: XSI_SYSTEM_LOGGING 704 :header: API, Supported 705 :widths: 50,10 706 707 closelog(),yes 708 openlog(),yes 709 setlogmask(),yes 710 syslog(),yes 711 712.. _posix_option_group_xsi_threads_ext: 713 714XSI_THREADS_EXT 715+++++++++++++++ 716 717The XSI_THREADS_EXT option group is required because it provides 718functions to control a thread's stack. This is considered useful for any 719real-time application. 720 721Enable this option group with :kconfig:option:`CONFIG_XSI_THREADS_EXT`. 722 723.. csv-table:: XSI_THREADS_EXT 724 :header: API, Supported 725 :widths: 50,10 726 727 pthread_attr_getstack(),yes 728 pthread_attr_setstack(),yes 729 pthread_getconcurrency(),yes 730 pthread_setconcurrency(),yes 731 732.. _posix_options: 733 734POSIX Options 735============= 736 737.. _posix_option_asynchronous_io: 738 739_POSIX_ASYNCHRONOUS_IO 740++++++++++++++++++++++ 741 742Functions part of the ``_POSIX_ASYNCHRONOUS_IO`` Option are not implemented in Zephyr but are 743provided so that conformant applications can still link. These functions will fail, setting 744``errno`` to ``ENOSYS``:ref:`†<posix_undefined_behaviour>`. 745 746Enable this option with :kconfig:option:`CONFIG_POSIX_ASYNCHRONOUS_IO`. 747 748.. csv-table:: _POSIX_ASYNCHRONOUS_IO 749 :header: API, Supported 750 :widths: 50,10 751 752 aio_cancel(),yes :ref:`†<posix_undefined_behaviour>` 753 aio_error(),yes :ref:`†<posix_undefined_behaviour>` 754 aio_fsync(),yes :ref:`†<posix_undefined_behaviour>` 755 aio_read(),yes :ref:`†<posix_undefined_behaviour>` 756 aio_return(),yes :ref:`†<posix_undefined_behaviour>` 757 aio_suspend(),yes :ref:`†<posix_undefined_behaviour>` 758 aio_write(),yes :ref:`†<posix_undefined_behaviour>` 759 lio_listio(),yes :ref:`†<posix_undefined_behaviour>` 760 761.. _posix_option_cputime: 762 763_POSIX_CPUTIME 764++++++++++++++ 765 766Enable this option with :kconfig:option:`CONFIG_POSIX_CPUTIME`. 767 768.. csv-table:: _POSIX_CPUTIME 769 :header: API, Supported 770 :widths: 50,10 771 772 CLOCK_PROCESS_CPUTIME_ID,yes 773 774.. _posix_option_fsync: 775 776_POSIX_FSYNC 777++++++++++++ 778 779Enable this option with :kconfig:option:`CONFIG_POSIX_FSYNC`. 780 781.. csv-table:: _POSIX_FSYNC 782 :header: API, Supported 783 :widths: 50,10 784 785 fsync(),yes 786 787.. _posix_option_ipv6: 788 789_POSIX_IPV6 790+++++++++++ 791 792Internet Protocol Version 6 is supported. 793 794For more information, please refer to :ref:`Networking <networking>`. 795 796Enable this option with :kconfig:option:`CONFIG_POSIX_IPV6`. 797 798.. _posix_option_memlock: 799 800_POSIX_MEMLOCK 801++++++++++++++ 802 803Zephyr's :ref:`Demand Paging API <memory_management_api_demand_paging>` does not yet support 804pinning or unpinning all virtual memory regions. The functions below are expected to fail and 805set ``errno`` to ``ENOSYS`` :ref:`†<posix_undefined_behaviour>`. 806 807Enable this option with :kconfig:option:`CONFIG_POSIX_MEMLOCK`. 808 809.. csv-table:: _POSIX_MEMLOCK 810 :header: API, Supported 811 :widths: 50,10 812 813 mlockall(), yes 814 munlockall(), yes 815 816.. _posix_option_memlock_range: 817 818_POSIX_MEMLOCK_RANGE 819++++++++++++++++++++ 820 821Enable this option with :kconfig:option:`CONFIG_POSIX_MEMLOCK_RANGE`. 822 823.. csv-table:: _POSIX_MEMLOCK_RANGE 824 :header: API, Supported 825 :widths: 50,10 826 827 mlock(), yes 828 munlock(), yes 829 830.. _posix_option_message_passing: 831 832_POSIX_MESSAGE_PASSING 833++++++++++++++++++++++ 834 835Enable this option with :kconfig:option:`CONFIG_POSIX_MESSAGE_PASSING`. 836 837.. csv-table:: _POSIX_MESSAGE_PASSING 838 :header: API, Supported 839 :widths: 50,10 840 841 mq_close(),yes 842 mq_getattr(),yes 843 mq_notify(),yes 844 mq_open(),yes 845 mq_receive(),yes 846 mq_send(),yes 847 mq_setattr(),yes 848 mq_unlink(),yes 849 850.. _posix_option_monotonic_clock: 851 852_POSIX_MONOTONIC_CLOCK 853++++++++++++++++++++++ 854 855Enable this option with :kconfig:option:`CONFIG_POSIX_MONOTONIC_CLOCK`. 856 857.. csv-table:: _POSIX_MONOTONIC_CLOCK 858 :header: API, Supported 859 :widths: 50,10 860 861 CLOCK_MONOTONIC,yes 862 863.. _posix_option_priority_scheduling: 864 865_POSIX_PRIORITY_SCHEDULING 866++++++++++++++++++++++++++ 867 868As processes are not yet supported in Zephyr, the functions ``sched_rr_get_interval()``, 869``sched_setparam()``, and ``sched_setscheduler()`` are expected to fail setting ``errno`` 870to ``ENOSYS``:ref:`†<posix_undefined_behaviour>`. 871 872Enable this option with :kconfig:option:`CONFIG_POSIX_PRIORITY_SCHEDULING`. 873 874.. csv-table:: _POSIX_PRIORITY_SCHEDULING 875 :header: API, Supported 876 :widths: 50,10 877 878 sched_get_priority_max(),yes 879 sched_get_priority_min(),yes 880 sched_getparam(),yes 881 sched_getscheduler(),yes 882 sched_rr_get_interval(),yes :ref:`†<posix_undefined_behaviour>` 883 sched_setparam(),yes :ref:`†<posix_undefined_behaviour>` 884 sched_setscheduler(),yes :ref:`†<posix_undefined_behaviour>` 885 sched_yield(),yes 886 887.. _posix_option_raw_sockets: 888 889_POSIX_RAW_SOCKETS 890++++++++++++++++++ 891 892Raw sockets are supported. 893 894For more information, please refer to :kconfig:option:`CONFIG_NET_SOCKETS_PACKET`. 895 896Enable this option with :kconfig:option:`CONFIG_POSIX_RAW_SOCKETS`. 897 898.. _posix_option_reader_writer_locks: 899 900_POSIX_READER_WRITER_LOCKS 901++++++++++++++++++++++++++ 902 903Enable this option with :kconfig:option:`CONFIG_POSIX_READER_WRITER_LOCKS`. 904 905.. csv-table:: _POSIX_READER_WRITER_LOCKS 906 :header: API, Supported 907 :widths: 50,10 908 909 pthread_rwlock_destroy(),yes 910 pthread_rwlock_init(),yes 911 pthread_rwlock_rdlock(),yes 912 pthread_rwlock_tryrdlock(),yes 913 pthread_rwlock_trywrlock(),yes 914 pthread_rwlock_unlock(),yes 915 pthread_rwlock_wrlock(),yes 916 pthread_rwlockattr_destroy(),yes 917 pthread_rwlockattr_getpshared(),yes 918 pthread_rwlockattr_init(),yes 919 pthread_rwlockattr_setpshared(),yes 920 921.. 922 this link is "deprecated" - mainly left here so that older links still work 923.. _posix_shared_memory_objects: 924 925.. _posix_option_shared_memory_objects: 926 927_POSIX_SHARED_MEMORY_OBJECTS 928++++++++++++++++++++++++++++ 929 930Enable this option with :kconfig:option:`CONFIG_POSIX_SHARED_MEMORY_OBJECTS`. 931 932.. csv-table:: _POSIX_SHARED_MEMORY_OBJECTS 933 :header: API, Supported 934 :widths: 50,10 935 936 mmap(), yes 937 munmap(), yes 938 shm_open(), yes 939 shm_unlink(), yes 940 941.. _posix_option_synchronized_io: 942 943_POSIX_SYNCHRONIZED_IO 944++++++++++++++++++++++ 945 946Enable this option with :kconfig:option:`CONFIG_POSIX_SYNCHRONIZED_IO`. 947 948.. csv-table:: _POSIX_SYNCHRONIZED_IO 949 :header: API, Supported 950 :widths: 50,10 951 952 fdatasync(),yes 953 fsync(),yes 954 msync(),yes 955 956.. _posix_option_thread_attr_stackaddr: 957 958_POSIX_THREAD_ATTR_STACKADDR 959++++++++++++++++++++++++++++ 960 961Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_ATTR_STACKADDR`. 962 963.. csv-table:: _POSIX_THREAD_ATTR_STACKADDR 964 :header: API, Supported 965 :widths: 50,10 966 967 pthread_attr_getstackaddr(),yes 968 pthread_attr_setstackaddr(),yes 969 970.. _posix_option_thread_attr_stacksize: 971 972_POSIX_THREAD_ATTR_STACKSIZE 973++++++++++++++++++++++++++++ 974 975Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_ATTR_STACKSIZE`. 976 977.. csv-table:: _POSIX_THREAD_ATTR_STACKSIZE 978 :header: API, Supported 979 :widths: 50,10 980 981 pthread_attr_getstacksize(),yes 982 pthread_attr_setstacksize(),yes 983 984.. _posix_option_thread_cputime: 985 986_POSIX_THREAD_CPUTIME 987+++++++++++++++++++++ 988 989Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_CPUTIME`. 990 991.. csv-table:: _POSIX_THREAD_CPUTIME 992 :header: API, Supported 993 :widths: 50,10 994 995 CLOCK_THREAD_CPUTIME_ID,yes 996 pthread_getcpuclockid(),yes 997 998.. _posix_option_thread_prio_inherit: 999 1000_POSIX_THREAD_PRIO_INHERIT 1001++++++++++++++++++++++++++ 1002 1003Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_PRIO_INHERIT`. 1004 1005.. csv-table:: _POSIX_THREAD_PRIO_INHERIT 1006 :header: API, Supported 1007 :widths: 50,10 1008 1009 pthread_mutexattr_getprotocol(),yes 1010 pthread_mutexattr_setprotocol(),yes 1011 1012.. _posix_option_thread_prio_protect: 1013 1014_POSIX_THREAD_PRIO_PROTECT 1015++++++++++++++++++++++++++ 1016 1017Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_PRIO_PROTECT`. 1018 1019.. csv-table:: _POSIX_THREAD_PRIO_PROTECT 1020 :header: API, Supported 1021 :widths: 50,10 1022 1023 pthread_mutex_getprioceiling(),yes 1024 pthread_mutex_setprioceiling(),yes 1025 pthread_mutexattr_getprioceiling(),yes 1026 pthread_mutexattr_getprotocol(),yes 1027 pthread_mutexattr_setprioceiling(),yes 1028 pthread_mutexattr_setprotocol(),yes 1029 1030.. _posix_option_thread_priority_scheduling: 1031 1032_POSIX_THREAD_PRIORITY_SCHEDULING 1033+++++++++++++++++++++++++++++++++ 1034 1035Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING`. 1036 1037.. csv-table:: _POSIX_THREAD_PRIORITY_SCHEDULING 1038 :header: API, Supported 1039 :widths: 50,10 1040 1041 pthread_attr_getinheritsched(),yes 1042 pthread_attr_getschedpolicy(),yes 1043 pthread_attr_getscope(),yes 1044 pthread_attr_setinheritsched(),yes 1045 pthread_attr_setschedpolicy(),yes 1046 pthread_attr_setscope(),yes 1047 pthread_getschedparam(),yes 1048 pthread_setschedparam(),yes 1049 pthread_setschedprio(),yes 1050 1051.. _posix_option_thread_safe_functions: 1052 1053_POSIX_THREAD_SAFE_FUNCTIONS 1054++++++++++++++++++++++++++++ 1055 1056Enable this option with :kconfig:option:`CONFIG_POSIX_THREAD_SAFE_FUNCTIONS`. 1057 1058.. csv-table:: _POSIX_THREAD_SAFE_FUNCTIONS 1059 :header: API, Supported 1060 :widths: 50,10 1061 1062 asctime_r(), yes 1063 ctime_r(), yes (UTC timezone only) 1064 flockfile(), 1065 ftrylockfile(), 1066 funlockfile(), 1067 getc_unlocked(), 1068 getchar_unlocked(), 1069 getgrgid_r(),yes :ref:`†<posix_undefined_behaviour>` 1070 getgrnam_r(),yes :ref:`†<posix_undefined_behaviour>` 1071 getpwnam_r(),yes :ref:`†<posix_undefined_behaviour>` 1072 getpwuid_r(),yes :ref:`†<posix_undefined_behaviour>` 1073 gmtime_r(), yes 1074 localtime_r(), yes (UTC timezone only) 1075 putc_unlocked(), 1076 putchar_unlocked(), 1077 rand_r(), yes 1078 readdir_r(), yes 1079 strerror_r(), yes 1080 strtok_r(), yes 1081 1082.. _posix_option_timeouts: 1083 1084_POSIX_TIMEOUTS 1085+++++++++++++++ 1086 1087Enable this option with :kconfig:option:`CONFIG_POSIX_TIMEOUTS`. 1088 1089.. csv-table:: _POSIX_TIMEOUTS 1090 :header: API, Supported 1091 :widths: 50,10 1092 1093 mq_timedreceive(),yes 1094 mq_timedsend(),yes 1095 pthread_mutex_timedlock(),yes 1096 pthread_rwlock_timedrdlock(),yes 1097 pthread_rwlock_timedwrlock(),yes 1098 sem_timedwait(),yes 1099 posix_trace_timedgetnext_event(), 1100 1101.. _posix_option_xopen_streams: 1102 1103_XOPEN_STREAMS 1104++++++++++++++ 1105 1106With the exception of ``ioctl()``, functions in the ``_XOPEN_STREAMS`` option group are not 1107implemented in Zephyr but are provided so that conformant applications can still link. 1108Unimplemented functions in this option group will fail, setting ``errno`` to ``ENOSYS`` 1109:ref:`†<posix_undefined_behaviour>`. 1110 1111Enable this option with :kconfig:option:`CONFIG_XOPEN_STREAMS`. 1112 1113.. csv-table:: _XOPEN_STREAMS 1114 :header: API, Supported 1115 :widths: 50,10 1116 1117 fattach(), yes :ref:`†<posix_undefined_behaviour>` 1118 fdetach(), yes :ref:`†<posix_undefined_behaviour>` 1119 getmsg(), yes :ref:`†<posix_undefined_behaviour>` 1120 getpmsg(), yes :ref:`†<posix_undefined_behaviour>` 1121 ioctl(), yes 1122 isastream(), yes :ref:`†<posix_undefined_behaviour>` 1123 putmsg(), yes :ref:`†<posix_undefined_behaviour>` 1124 putpmsg(), yes :ref:`†<posix_undefined_behaviour>` 1125 1126.. _Subprofiling Considerations: 1127 https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html 1128