学习笔记:IEEE 1003.13-2003(POSIX实时与嵌入式规范)

一、文档

在线参考:IEEE 1003.13-2003

免费下载Draft 版本(pdf):IEEE Std. 1003.13

二、概念

1、POSIX标准

可移植操作系统接口(英语:Portable Operating System Interface,缩写为POSIX)是IEEE为要在各种UNIX操作系统上运行软件,而定义API的一系列互相关联的标准的总称。

目前广泛使用的 POSIX 标准是 1003.1 标准,全称为IEEE Std 1003.1(缩写写法为 POSIX.1)。

2、IEEE 1003.13

IEEE 1003.13是POSIX 针对嵌入式领域制定的标准【实时规范 (reatime profiles)】,该标准是由 IEEE Std 1003.1 筛选而来,因此是其子集。

POSIX 为了提供不同层级的RTOS能力,IEEE Std. 1003.13 定义了四个子集:

  • Minimal:最小嵌入式子集规范 ------ PSE51
  • Controller:工业控制器子集规范 ------ PSE52
  • Dedicated:较大规模的嵌入式系统子集规范 ------ PSE53
  • Multi-Purpose:具有实时性要求的大规模通用系统子集规范 ------ PSE54

3、规范划分

主要根据Module 和_POSIX_开头宏来进行细化

三、Module划分

1、Module划分表

|--------|------------------------|-----------|-----------|-----------|-----------|
| SN | Module | PSE51 | PSE52 | PSE53 | PSE54 |
| 1 | POSIX_C_LANG_JUMP | X | X | X | X |
| 2 | POSIX_C_LANG_MATH | - | X | X | X |
| 3 | POSIX_C_LANG_SUPPORT | X | X | X | X |
| 4 | POSIX_C_LANG_WIDE_CHAR | - | - | - | X |
| 5 | POSIX_DEVICE_IO | X | X | X | X |
| 6 | POSIX_DEVICE_SPECIFIC | - | - | - | X |
| 7 | POSIX_EVENT_MGMT | - | - | X | X |
| 8 | POSIX_FD_MGMT | - | X | X | X |
| 9 | POSIX_FIFO | - | - | - | X |
| 10 | POSIX_FILE_ATTRIBUTES | - | - | - | X |
| 11 | POSIX_FILE_LOCKING | X | X | X | X |
| 12 | POSIX_FILE_SYSTEM | - | X | X | X |
| 13 | POSIX_FILE_SYSTEM_EXT | - | - | - | X |
| 14 | POSIX_JOB_CONTROL | - | - | - | X |
| 15 | POSIX_MULTI_PROCESS | - | - | X | X |
| 16 | POSIX_NETWORKING | - | - | X | X |
| 17 | POSIX_PIPE | - | - | X | X |
| 18 | POSIX_PRIORITY_RANGES | X | X | X | X |
| 19 | POSIX_REGEXP | - | - | - | X |
| 20 | POSIX_SHELL_FUNC | - | - | - | X |
| 21 | POSIX_SIGNALS | X | X | X | X |
| 22 | POSIX_SIGNAL_JUMP | - | - | X | X |
| 23 | POSIX_SINGLE_PROCESS | X | X | X | X |
| 24 | POSIX_STRING_MATCHING | - | - | - | X |
| 25 | POSIX_SYMBOLIC_LINKS | - | - | - | X |
| 26 | POSIX_SYSTEM_DATABASE | - | - | - | X |
| 27 | POSIX_THREADS_BASE | X | X | X | X |
| 28 | POSIX_USER_GROUPS | - | - | - | X |
| 29 | POSIX_WIDE_CHAR_IO | - | - | - | X |
| 30 | XSI_DYNAMIC_LINKING | - | - | - | X |
| 31 | XSI_SYSTEM_LOGGING | - | - | - | X |
| 32 | XSI_THREAD_MUTEX_EXT | X | X | X | X |
| 33 | XSI_THREADS_EXT | X | X | X | X |

2、Module对应的Function表

|--------|-----------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SN | Module | Profile | Function |
| 1 | POSIX_C_LANG_JUMP | PSE51 | longjmp(), setjmp() |
| 2 | POSIX_C_LANG_MATH (249) | PSE52 | 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() |
| 3 | POSIX_C_LANG_SUPPORT (105) | PSE51 | abs(), asctime(), asctime_r(), atof(), atoi(), atol(), atoll(), bsearch(), calloc(), ctime(), ctime_r(), difftime(), div(), feclearexcept(), fegetenv(), fegetexceptflag(), fegetround(), feholdexcept(), feraiseexcept(), fesetenv(), fesetexceptflag(), fesetround(), fetestexcept(), feupdateenv(), free(), gmtime(), gmtime_r(), imaxabs(), imaxdiv(), isalnum(), isalpha(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), labs(), ldiv(), llabs(), lldiv(), localeconv(), localtime(), localtime_r(), malloc(), memchr(), memcmp(), memcpy(), memmove(), memset(), mktime(), qsort(), rand(), rand_r(), realloc(), setlocale(), snprintf(), sprintf(), srand(), sscanf(), strcat(), strchr(), strcmp(), strcoll(), strcpy(), strcspn(), strerror(), strerror_r(), strftime(), strlen(), strncat(), strncmp(), strncpy(), strpbrk(), strrchr(), strspn(), strstr(), strtod(), strtof(), strtoimax(), strtok(), strtok_r(), strtol(), strtold(), strtoll(), strtoul(), strtoull(), strtoumax(), strxfrm(), time(), tolower(), toupper(), tzname, tzset(), va_arg(), va_copy(), va_end(), va_start(), vsnprintf(), vsprintf(), vsscanf() |
| 4 | POSIX_C_LANG_WIDE_CHAR (66) | PSE54 | btowc(), iswalnum(), iswalpha(), iswblank(), iswcntrl(), iswctype(), iswdigit(), iswgraph(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), iswxdigit(), mblen(), mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(), mbstowcs(), mbtowc(), swprintf(), swscanf(), towctrans(), towlower(), towupper(), vswprintf(), vswscanf(), wcrtomb(), wcscat(), wcschr(), wcscmp(), wcscoll(), wcscpy(), wcscspn(), wcsftime(), wcslen(), wcsncat(), wcsncmp(), wcsncpy(), wcspbrk(), wcsrchr(), wcsrtombs(), wcsspn(), wcsstr(), wcstod(), wcstof(), wcstoimax(), wcstok(), wcstol(), wcstold(), wcstoll(), wcstombs(), wcstoul(), wcstoull(), wcstoumax(), wcsxfrm(), wctob(), wctomb(), wctrans(), wctype(), wmemchr(), wmemcmp(), wmemcpy(), wmemmove(), wmemset() |
| 5 | POSIX_DEVICE_IO (40) | PSE51 | clearerr(), close(), fclose(), fdopen(), feof (), ferror(), fflush (), fgetc(), fgets(), fileno(), fopen(), fprintf(), fputc(), fputs(), fread(), freopen(), fscanf(), fwrite(), getc(), getchar(), gets(), open(), perror(), printf(), putc(), putchar(), puts(), read(), scanf(), setbuf(), setvbuf(), stderr(), stdin(), stdout(), ungetc(), vfprintf (), vfscanf(), vprintf(), vscanf(), write() |
| 6 | POSIX_DEVICE_SPECIFIC (14) | PSE54 | cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), ctermid(), isatty(), tcdrain(), tcflow(), tcflush(), tcgetattr(), tcsendbreak(), tcsetattr(), ttyname(), ttyname_r() |
| 7 | POSIX_EVENT_MGMT | PSE53 | FD_CLR(), FD_ISSET(), FD_SET(), FD_ZERO(), pselect(), select() |
| 8 | POSIX_FD_MGMT | PSE52 | dup(), dup2(), fcntl(), fgetpos(), fseek(), fseeko(), fsetpos(), ftell(), ftello(), ftruncate(), lseek(), rewind() |
| 9 | POSIX_FIFO | PSE54 | mkfifo() |
| 10 | POSIX_FILE_ATTRIBUTES | PSE54 | chmod(), chown(), fchmod(), fchown(), umask() |
| 11 | POSIX_FILE_LOCKING | PSE51 | flockfile(), ftrylockfile(), funlockfile(), getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked() |
| 12 | POSIX_FILE_SYSTEM | PSE52 | access(), chdir(), closedir(), creat(), fpathconf(), fstat(), getcwd(), link(), mkdir(), opendir(), pathconf(), readdir(), readdir_r(), remove(), rename(), rewinddir(), rmdir(), stat(), tmpfile(), tmpnam(), unlink(), utime() |
| 13 | POSIX_FILE_SYSTEM_EXT | PSE54 | glob(), globfree() |
| 14 | POSIX_JOB_CONTROL | PSE54 | setpgid(), tcgetpgrp(), tcsetpgrp() |
| 15 | POSIX_MULTI_PROCESS | PSE53 | _Exit(), _exit(), assert(), atexit(), clock(), execl(), execle(), execlp(), execv(), execve(), execvp(), exit(), fork(), getpgrp(), getpid(), getppid(), setsid(), sleep(), times(), wait(), waitpid() |
| 16 | POSIX_NETWORKING | PSE53 | accept(), bind(), connect(), endhostent(), endnetent(), endprotoent(), endservent(), freeaddrinfo(), gai_strerror(), getaddrinfo(), gethostbyaddr(), gethostbyname(), gethostent(), gethostname(), getnameinfo(), getnetbyaddr(), getnetbyname(), getnetent(), getpeername(), getprotobyname(), getprotobynumber(), getprotoent(), getservbyname(), getservbyport(), getservent(), getsockname(), getsockopt(), htonl(), htons(), if_freenameindex(), if_indextoname(), if_nameindex(), if_nametoindex(), inet_addr(), inet_ntoa(), inet_ntop(), inet_pton(), listen(), ntohl(), ntohs(), recv(), recvfrom(), recvmsg(), send(), sendmsg(), sendto(), sethostent(), setnetent(), setprotoent(), setservent(), setsockopt(), shutdown(), socket(), sockatmark(), socketpair() |
| 17 | POSIX_PIPE | PSE53 | pipe() |
| 18 | POSIX_PRIORITY_RANGES | PSE51 | sched_get_priority_max(), sched_get_priority_min(), sched_rr_get_interval() |
| 19 | POSIX_REGEXP | PSE54 | regcomp(), regerror(), regexec(), regfree() |
| 20 | POSIX_SHELL_FUNC | PSE54 | pclose(), popen(), system(), wordexp(), wordfree() |
| 21 | POSIX_SIGNALS | PSE51 | abort(), alarm(), kill(), pause(), raise(), sigaction(), sigaddset(), sigdelset(), sigemptyset(), sigfillset(), sigismember(), signal(), sigpending(), sigprocmask(), sigsuspend(), sigwait() |
| 22 | POSIX_SIGNAL_JUMP | PSE53 | siglongjmp(), sigsetjmp() |
| 23 | POSIX_SINGLE_PROCESS | PSE51 | confstr(), getenv(), setenv(), sysconf(), uname(), unsetenv() |
| 24 | POSIX_STRING_MATCHING | PSE54 | fnmatch(), getopt() |
| 25 | POSIX_SYMBOLIC_LINKS | PSE54 | lstat(), readlink(), symlink() |
| 26 | POSIX_SYSTEM_DATABASE | PSE54 | getgrgid(), getgrgid_r(), getgrnam(), getgrnam_r(), getpwnam(), getpwnam_r(), getpwuid(), getpwuid_r() |
| 27 | POSIX_THREADS_BASE | PSE51 | pthread_atfork(), pthread_attr_destroy(), pthread_attr_getdetachstate(), pthread_attr_getschedparam(), pthread_attr_init(), pthread_attr_setdetachstate(), pthread_attr_setschedparam(), pthread_cancel(), pthread_cleanup_pop(), pthread_cleanup_push(), pthread_cond_broadcast(), pthread_cond_destroy(), pthread_cond_init(), pthread_cond_signal(), pthread_cond_timedwait(), pthread_cond_wait(), pthread_condattr_destroy(), pthread_condattr_init(), pthread_create(), pthread_detach(), pthread_equal(), pthread_exit(), pthread_getspecific(), pthread_join(), pthread_key_create(), pthread_key_delete(), pthread_kill(), pthread_mutex_destroy(), pthread_mutex_init(), pthread_mutex_lock(), pthread_mutex_trylock(), pthread_mutex_unlock(), pthread_mutexattr_destroy(), pthread_mutexattr_init(), pthread_once(), pthread_self(), pthread_setcalcelstate(), pthread_setcanceltype(), pthread_setspecific(), pthread_sigmask(), pthread_testcancel() |
| 28 | POSIX_USER_GROUPS | PSE54 | getegid(), geteuid(), getgid(), getgroups(), getlogin(), getlogin_r(), getuid(), setegid(), seteuid, setgid(), setuid() |
| 29 | POSIX_WIDE_CHAR_IO | PSE54 | fgetwc(), fgetws(), fputwc(), fputws(), fwide(), fwprintf(), fwscanf(), getwc(), getwchar(), putwc(), putwchar(), ungetwc(), vfwprintf(), vfwscanf(), vwprintf(), vwscanf(), wprintf(), wscanf() |
| 30 | XSI_DYNAMIC_LINKING | PSE54 | dlclose(), dlerror(), dlopen(), dlsym() |
| 31 | XSI_SYSTEM_LOGGING | PSE54 | closelog(), openlog(), setlogmask(), syslog() |
| 32 | XSI_THREAD_MUTEX_EXT | PSE51 | pthread_mutexattr_gettype(), pthread_mutexattr_settype() |
| 33 | XSI_THREADS_EXT | PSE51 | pthread_attr_getguardsize(), pthread_attr_getstack(), pthread_attr_setguardsize(), pthread_attr_setstack(), pthread_getconcurrency(), pthread_setconcurrency() |

四、_POSIX_开头宏划分

1、_POSIX_开头宏划分表

|--------|-----------------------------------|-----------|-----------|-----------|-----------|
| SN | _POSIX_宏 | PSE51 | PSE52 | PSE53 | PSE54 |
| 1 | _POSIX_ADVISORY_INFO | - | - | - | X |
| 2 | _POSIX_ASYNCHRONOUS_IO | - | - | X | X |
| 3 | _POSIX_CLOCK_SELECTION | X | X | X | X |
| 4 | _POSIX_CPUTIME | - | - | X | X |
| 5 | _POSIX_FSYNC | X | X | X | X |
| 6 | _POSIX_MAPPED_FILES | - | X | X | X |
| 7 | _POSIX_MEMLOCK | X | X | X | X |
| 8 | _POSIX_MEMLOCK_RANGE | X | X | X | X |
| 9 | _POSIX_MEMORY_PROTECTION | - | - | X | X |
| 10 | _POSIX_MESSAGE_PASSING | - | X | X | X |
| 11 | _POSIX_PRIORITY_SCHEDULING | - | - | X | X |
| 12 | _POSIX_REALTIME_SIGNALS | X | X | X | X |
| 13 | _POSIX_SEMAPHORES | X | X | X | X |
| 14 | _POSIX_SHARED_MEMORY_OBJECTS | X | X | X | X |
| 15 | _POSIX_SPAWN | - | - | X | X |
| 16 | _POSIX_SYNCHRONIZED_IO | X | X | X | X |
| 17 | _POSIX_THREAD_ATTR_STACKADDR | X | X | X | X |
| 18 | _POSIX_THREAD_ATTR_STACKSIZE | X | X | X | X |
| 19 | _POSIX_THREAD_CPUTIME | X | X | X | X |
| 20 | _POSIX_THREAD_PRIO_INHERIT | X | X | X | X |
| 21 | _POSIX_THREAD_PRIO_PROTECT | X | X | X | X |
| 22 | _POSIX_THREAD_PRIORITY_SCHEDULING | X | X | X | X |
| 23 | _POSIX_THREAD_PROCESS_SHARED | - | - | X | X |
| 24 | _POSIX_TIMEOUTS | X | X | X | X |
| 25 | _POSIX_TIMERS | X | X | X | X |
| 26 | _POSIX_TRACE | - | X | X | X |
| 27 | _POSIX_TRACE_EVENT_FILTER | - | X | X | X |
| 28 | _POSIX_TRACE_LOG | - | X | X | X |

2、_POSIX_开头宏应的Function表

|--------|---------------------------------------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SN | POSIX | Profile | Function | 备注 |
| 1 | _POSIX_ADVISORY_INFO | PSE54 | posix_fadvise(), posix_fallocate(), posix_memalign() |   |
| 2 | POSIX ADVISORY_INFO and either _POSIX_MAPPED_FILES or POSIX_SHARED MEMORY_OBJECTS | PSE54 | posix_madvise() | _POSIX_ADVISORY_INFO(PSE54) _POSIX_MAPPED_FILES(PSE52) _POSIX_SHARED_MEMORY _OBJECTS(PSE51) |
| 3 | _POSIX _ASYNCHRONOUS_IO | PSE53 | aio_cancel(),aio_error(),aio_fsync(), aio_read(),aio_return(), aio_suspend(), aio_write(), lio_listio() |   |
| 4 | POSIX CLOCK_SELECTION | PSE51 | clock_nanosleep() |   |
| 5 | POSIX CLOCK_SELECTION and _POSIX_THREADS | PSE51 | pthread_condattr_getclock(), pthread_condattr_setclock() | _POSIX_THREADS同 = POSIX_THREADS_BASE(支持) + _POSIX_READER_WRITER_LOCKS (不支持) |
| 6 | _POSIX_CPUTIME | PSE53 | clock_getcpuclokid() |   |
| 7 | _POSIX_FSYNC | PSE51 | fsync() |   |
| 8 | _POSIX_MAPPED_FILES and POSIX SYNCHRONIZED_IO | PSE52 | msync() | _POSIX_MAPPED_FILES(PSE52) _POSIX_SYNCHRONIZED_IO(PSE51) |
| 9 | _POSIX_MEMLOCK | PSE51 | mlockall(), munlockall() |   |
| 10 | POSIX MEMLOCK_RANGE | PSE51 | mlock(), munlock() |   |
| 11 | _POSIX_MEMORY _PROTECTION | PSE53 | mprotect() |   |
| 12 | POSIX MESSAGE_PASSING | PSE52 | mq_close(), mq_getattr(), mq_notify(), mq_open(), mq_receive(), mq_send(), mq_setattr(), mq_unlink() |   |
| 13 | POSIX MESSAGE_PASSING and _POSIX_TIMEOUTS | PSE52 | mq_timedreceive(), mq_timedsend() | _POSIX_MESSAGE_PASSING(PSE52) _POSIX_TIMEOUTS(PSE51) |
| 14 | _POSIX_PRIORITY _SCHEDULING | PSE53 | sched_get_priority_max(), sched_get_priority_min(), sched_getparam(), sched_getscheduler(), sched_rr_get_interval(), sched_setparam(), sched_setscheduler(), sched_yield() | _POSIX_THREAD_PRIORITY _SCHEDULING and _POSIX_THREADS里面也包含(PSE51) 下面3个sched_get_priority_max(), sched_get_priority_min(), sched_rr_get_interval() |
| 15 | _POSIX_REALTIME _SIGNALS | PSE51 | sigqueue(), sigtimedwait(), sigwaitinfo() |   |
| 16 | _POSIX_SEMAPHORES | PSE51 | sem_close(), sem_destroy(), sem_getvalue(), sem_init(), sem_open(), sem_post(), sem_trywait(), sem_wait(), sem_unlink() |   |
| 17 | _POSIX_SEMAPHORES and _POSIX_TIMEOUTS | PSE51 | sem_timedwait() | _POSIX_SEMAPHORES(PSE51) _POSIX_TIMEOUTS(PSE51) |
| 18 | POSIX_SHARED MEMORY_OBJECTS | PSE51 | shm_open(), shm_unlink() |   |
| 19 | POSIX_SHARED MEMORY_OBJECTS or _POSIX_MAPPED_FILES | PSE51 | mmap(), munmap() | _POSIX_SHARED_MEMORY _OBJECTS(PSE51) _POSIX_MAPPED_FILES(PSE52) |
| 20 | _POSIX_SPAWN | PSE53 | posix_spawn(), posix_spawn_file _actions_addclose(), posix_spawn_file _actions_adddup2(), posix_spawn_file _actions_addopen(), posix_spawn_file _actions_destroy(), posix_spawn_file_actions_init(), posix_spawnattr_destroy(), posix_spawnattr_getflags(), posix_spawnattr_getpgroup(), posix_spawnattr_getsigdefault(), posix_spawnattr_getsigmask(), posix_spawnattr_init(), posix_spawnattr_setflags(), posix_spawnattr_setpgroup(), posix_spawnattr_setsigdefault(), posix_spawnattr_setsigmask(), posix_spawnp() |   |
| 21 | _POSIX_SPAWN and _POSIX_PRIORITY _SCHEDULING | PSE53 | posix_spawnattr_getschedparam(), posix_spawnattr_setschedparam(), posix_spawnattr_getschedpolicy(), posix_spawnattr_setschedpolicy() | _POSIX_PRIORITY_SCHEDULING (PSE53) _POSIX_SPAWN(PSE53) |
| 22 | POSIX SYNCHRONIZED_IO | PSE51 | fdatasync() |   |
| 23 | POSIX_THREAD ATTR_STACKADDR and _POSIX_THREADS | PSE51 | pthread_attr_getstackaddr(), pthread_attr_setstackaddr() | POSIX_THREAD_ATTR STACKADDR(PSE51) |
| 24 | POSIX_THREAD ATTR_STACKADDR, _POSIX_THREADS and POSIX_THREAD ATTR_STACKSIZE | PSE51 | pthread_attr_getstack(), pthread_attr_setstack() | _POSIX_THREAD_ATTR _STACKADDR(PSE51)_POSIX_THREAD_ATTR _STACKSIZE(PSE51) 【XSI_THREADS_EXT中也有pthread_attr_getstack(), pthread_attr_setstack()】 |
| 25 | POSIX_THREAD ATTR_STACKSIZE and _POSIX_THREADS | PSE51 | pthread_attr_getstacksize(), pthread_attr_setstacksize() | _POSIX_THREAD_ATTR_STACKSIZE(PSE51) |
| 26 | POSIX THREAD_CPUTIME and _POSIX_THREADS | PSE51 | pthread_getcpuclockid() | _POSIX_THREAD_CPUTIME(PSE51) |
| 27 | _POSIX_THREAD _PRIO_INHERIT and _POSIX_THREADS | PSE51 | pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol() | _POSIX_THREAD_PRIO_INHERIT(PSE51) 【这两个函数同_POSIX_THREAD_PRIO_PROTECT and _POSIX_THREADS】 |
| 28 | POSIX_THREAD PRIO_PROTECT and _POSIX_THREADS | PSE51 | pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), pthread_mutexattr_setprioceiling(), pthread_mutexattr_setprotocol() | _POSIX_THREAD_PRIO_PROTECT(PSE51) 【_POSIX_THREAD_PRIO_INHERIT and _POSIX_THREADS里面也有pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol()】 |
| 29 | _POSIX_THREAD _PRIORITY_SCHEDULING and _POSIX_THREADS | PSE51 | pthread_attr_getinheritsched(), pthread_attr_getschedpolicy(), pthread_attr_getscope(), pthread_attr_setinheritsched(), pthread_attr_setschedpolicy(), pthread_attr_setscope(), pthread_getschedparam(), pthread_setschedparam(), pthread_setschedprio(), sched_get_priority_max(), sched_get_priority_min(), sched_rr_get_interval() | _POSIX_THREAD_PRIORITY _SCHEDULING(PSE51) 【POSIX_PRIORITY SCHEDULING里面也包含(PSE53) 下面3个sched_get_priority_max(), sched_get_priority_min(), sched_rr_get_interval()】 |
| 30 | _POSIX_THREAD _PROCESS_SHARED and _POSIX_THREADS | PSE53 | pthread_condattr_getpshared(), pthread_condattr_setpshared(), pthread_mutexattr_getpshared(), pthread_mutexattr_setpshared(), pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared() | POSIX_THREAD PROCESS_SHARED(PSE51) _POSIX_THREADS = POSIX_THREADS_BASE(支持)+ _POSIX_READER_WRITER_LOCKS(不支持) 【pthread_rwlock*不支持】 |
| 31 | _POSIX_TIMEOUTS and _POSIX_THREADS | PSE51 | pthread_mutex_timedlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock() | _POSIX_TIMEOUTS(PSE51) _POSIX_THREADS = POSIX_THREADS_BASE(支持)+ _POSIX_READER_WRITER_LOCKS(不支持) 【pthread_rwlock*不支持】 |
| 32 | _POSIX_TIMEOUTS and _POSIX_TRACE | PSE52 | posix_trace_timedgetnext_event() | _POSIX_TIMEOUTS(PSE51) _POSIX_TRACE(PSE52) |
| 33 | _POSIX_TIMERS | PSE51 | clock_getres(), clock_gettime(), clock_settime(), nanosleep(), timer_create(), timer_detele(), timer_getoverrun(), timer_gettime(), timer_settime() |   |
| 34 | _POSIX_TRACE | PSE52 | posix_trace_attr_destroy(), posix_trace_attr_getclockres(), posix_trace_attr_getcreatetime(), posix_trace_attr_getgenversion(), posix_trace_attr_getname(), posix_trace_attr _getstreamfullpolicy(), posix_trace_attr_getmaxdatasize(), posix_trace_attr _getmaxsystemeventsize(), posix_trace_attr _getmaxusereventsize(), posix_trace_attr_getstreamsize(), posix_trace_attr_init(), posix_trace_attr_setname(), posix_trace_attr _setstreamfullpolicy(), posix_trace_attr_setmaxdatasize(), posix_trace_attr_setstreamsize(), posix_trace_clear(), posix_trace_create(), posix_trace_event(), posix_trace_eventid_open(), posix_trace_eventid_equal(), posix_trace_eventid_get_name(), posix_trace_eventtypelist _getnext_id(), posix_trace_eventtypelist_rewind(), posix_trace_get_attr(), posix_trace_get_status(), posix_trace_getnext_event(), posix_trace_shutdown(), posix_trace_start(), posix_trace_stop(), posix_trace_trygetnext_event() |   |
| 35 | _POSIX_TRACE and _POSIX_TRACE_LOG | PSE52 | posix_trace_attr_getlogfullpolicy(), posix_trace_attr_getlogsize(), posix_trace_attr_setlogfullpolicy(), posix_trace_attr_setlogsize(), posix_trace_close(), posix_trace_open(), posix_trace_rewind(), posix_trace_create_withlog(), posix_trace_flush() | _POSIX_TRACE(PSE52) _POSIX_TRACE_LOG(PSE52) |
| 36 | _POSIX_TRACE and _POSIX_TRACE _EVENT_FILTER | PSE52 | posix_trace_eventset_add(), posix_trace_eventset_del(), posix_trace_eventset_empty(), posix_trace_eventset_fill(), posix_trace_eventset_ismember(), posix_trace_get_filter(), posix_trace_set_filter(), posix_trace_trid_eventid_open() | _POSIX_TRAC(PSE52) _POSIX_TRACE_EVENT_FILTER(PSE52) |

五、参考

参考: POSIX标准及RT-Thread实现情况

相关推荐
南宫生4 小时前
力扣-图论-17【算法学习day.67】
java·学习·算法·leetcode·图论
sanguine__4 小时前
Web APIs学习 (操作DOM BOM)
学习
冷眼看人间恩怨4 小时前
【Qt笔记】QDockWidget控件详解
c++·笔记·qt·qdockwidget
数据的世界016 小时前
.NET开发人员学习书籍推荐
学习·.net
四口鲸鱼爱吃盐6 小时前
CVPR2024 | 通过集成渐近正态分布学习实现强可迁移对抗攻击
学习
OopspoO8 小时前
qcow2镜像大小压缩
学习·性能优化
A懿轩A9 小时前
C/C++ 数据结构与算法【栈和队列】 栈+队列详细解析【日常学习,考研必备】带图+详细代码
c语言·数据结构·c++·学习·考研·算法·栈和队列
居居飒9 小时前
Android学习(四)-Kotlin编程语言-for循环
android·学习·kotlin
kkflash39 小时前
提升专业素养的实用指南
学习·职场和发展
Hejjon10 小时前
SpringBoot 整合 SQLite 数据库
笔记