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