#2966 assigned project

POSIX Compliance

Reported by: aditya Owned by: Joel Sherrill
Priority: normal Milestone: Indefinite
Component: unspecified Version: 5
Severity: normal Keywords: SoC, API, kernel, small, large
Cc: Blocked By:

Description (last modified by Joel Sherrill)

POSIX Compliance


  1. POSIX Compliance
    1. Mentors
    2. Students
    3. Status
    4. Introduction
    5. Goal
    6. Project Tasks
      1. Pending Tasks
      2. Active Tasks
      3. Closed Tasks
    7. Requirements
    8. Tasks Without Tickets
    9. Testing
    10. References


Joel Sherrill


Past, Present, and Potential Students


See Project Tasks.


Increase the POSIX functions supported by RTEMS and Newlib.


Improve POSIX compliance of RTEMS and Newlib.

Project Tasks

Pending Tasks

Active Tasks

The following are the open tickets that are sub-tasks of this project. If you work on a part of this project please make a ticket and add the tag POSIX-Compliance.

mq_open lacks support of "mode" argument
sem_open lacks support of "mode" argument
sys/features.h ill-defines _POSIX_MEMLOCK and _POSIX_MEMLOCK_RANGE
dup2 is broken
rename(2) does not allow destination file to exist, contravenes POSIX and RTEMS documentation
Enable getdate() in newlib
Enable search.h functionality in newlib
Enhance support for POSIX mutex types
Support for sigaction() sa_flags Values
POSIX timer_create() should support CLOCK_MONOTONIC
Add dirfd() and fdopendir() methods in dirent.h
add tests for inttypes.h methods to RTEMS
CLOCK_MONOTONIC option on all POSIX services not exercised
unknown type name 'off_t' in regex.h
add getdelim() and getline() to stdio.h
Remove #if defined(__CYGWIN__) from complex.h header file
Investigate standards origin of y0l, y1l, and ynl for psxhdrs tests
Add fmtmsg.h to newlib
Add support for ucontext.h methods
Add iswalnum(), iswalpha() ... (and 18 others) to <wchar.h> header
Add support for uchar.h header
Add support for stdlib.h method - getsubopt
Add support for stdlib.h method - grantpt
Add support for stdlib.h method - posix_openpt
Add support for stdlib.h method - ptsname
Add support for stdlib.h method - unlockpt
Add sys/ipc.h to newlib (System V IPC support)
Add support for sys/resource.h method - getpriority
Add support for sys/resource.h method - getrlimit
Add support for sys/resource.h method - setpriority
Add support for sys/resource.h method - setrlimit
Function prototypes for posix_fadvise() and posix_fallocate() missing in <fcntl.h> header file
Add support for sys/msg.h methods
Add sys/statvfs.h Header Files and Methods
Add Support for POSIX utmpx.h
Add Support for POSIX sys/shm.h (System V Shared Memory)
Move aio.h from RTEMS to newlib
POSIX Timers Do Not Support SIGEV_THREAD
Test needed for timer_create with CLOCK_MONOTONIC
Test needed for clock_nanosleep with CLOCK_MONOTONIC
Implement pthread_getcpuclockid()
Implement clock_getcpuclockid()
Add support for sigaction SA_RESETHAND
Add long double math methods to newlib
Move mqueue.h to newlib
open() non-blocking mode. not posix compliant

Closed Tasks

POSIX Condition Variables Clock Attribute Support
pthread_setschedprio() is missing
Add posix_devctl()
Implement POSIX Shared Memory Objects
newlib inttypes.h is missing some methods
Add ftw.h to newlib
Add fenv.h to newlib
Add ndbm.h support
add confstr() method
Add support for poll.h method - poll
Add sockatmark to libbsd


RTEMS POSIX Compliance is achieved via a combination of methods and .h files in RTEMS and the newlib C Library. Newlib also provides the math library.

Disclaimer: The order in which methods/issues are presented here should not be taken as the priority with which they should be addressed. It is also quite likely this list is incomplete. A more complete view of the situation is in the RTEMS POSIX Compliance Guide available at https://docs.rtems.org. That document was created from a spreadsheet which is a .csv file available in the rtems-docs repository. RTEMS compliance is tracked against multiple versions of POSIX, C Language versions, and embedded standards which profile the POSIX standard.

Before planning to implement anything on this list, please review rtems, newlib, rtems-libbsd, and the .h files newlib installs. These four are the sources for RTEMS POSIX support. Each is a moving target. Request updates to the spreadsheet when you find places that need updating.

Tasks Without Tickets

RTEMS itself is missing a few methods and may have issues with others. These methods may have outstanding POSIX compliance issues:

  • Improved support at the API level for CLOCK_MONOTONIC (may have ticket)
    • This impacts timer_create() and at least pthread_condvar_timedwait
  • List IO
  • Are all methods in signal.h possible provided?

Newlib also has some known issues:

  • sys/statvfs.h is missing
    • Implementation would likely be in RTEMS
  • some random number related calls are missing
  • fstatvfs is missing at least a prototype in the right place

Others will be impossible to implement without multiple processes, and so we'll have to determine which methods make sense to support and in what manner.


  • Functional unit testing as needed
  • Additions to psxhdrs test to ensure methods can be invoked per Open Group specification
  • FACE Consortium Conformance Test Suite. The FACE Consortium has defined four POSIX profiles. RTEMS can support most of the methods in the largest profile (General Purpose).


Change History (29)

comment:1 Changed on 04/02/17 at 16:31:45 by Joel Sherrill

Description: modified (diff)
Version: 4.114.12

comment:2 Changed on 04/03/17 at 05:44:59 by Sebastian Huber

This ticket is too complex. If someone starts to work on one of its topics, then a new ticket should be opened.

comment:3 Changed on 04/03/17 at 12:22:45 by Gedare Bloom

Keywords: SoC API added
Owner: set to joel
Status: newassigned

comment:4 Changed on 04/03/17 at 12:38:36 by Joel Sherrill

Should this ticket be modified or closed with a hint that each subtask needs a ticket. That was the intent a yeah.

We can't have a ticket and wiki page duplicating each other.

comment:5 Changed on 04/03/17 at 17:46:32 by Gedare Bloom

The wiki pages are supposed to be converted to tickets. This is the right thing to do. If this ticket is too complex, then the wiki page was too complex. We want to document each Open Project as a ticket now. It makes some aspects of "Project Lifecycle" easier to manage.

comment:6 Changed on 04/03/17 at 18:06:54 by Joel Sherrill

The umbrella of POSIX compliance is very large. It is a series of tickets. Trac just doesn't provide a great mechanism for dealing with that.

I agree it is a series of tickets but how do you capture the general goal which might have 50 subtasks each of which is a legitimate small-medium project?

comment:7 Changed on 04/03/17 at 23:21:04 by Chris Johns

Description: modified (diff)

Add a Trac ticket query to report on open tickets.

comment:8 Changed on 04/03/17 at 23:27:38 by Chris Johns

Description: modified (diff)

Reformat the project into headings.
Add Project Tasks and add pending, active and closed reports.

comment:9 Changed on 04/03/17 at 23:29:55 by Chris Johns

Description: modified (diff)

Use page outline and not TOC.

comment:10 Changed on 04/03/17 at 23:30:28 by Chris Johns

Description: modified (diff)

Simplify the heading.

comment:11 Changed on 04/03/17 at 23:34:14 by Joel Sherrill

Description: modified (diff)

comment:12 Changed on 04/03/17 at 23:37:13 by Joel Sherrill

Chris and I converted this ticket to an umbrella ticket to track tickets with the tag "POSIX-Compliance". Tasks with tickets are automatically inserted and those without tickets are just listed for now. Tickets need to be written.

The Wiki page was deleted.

comment:13 Changed on 04/03/17 at 23:41:50 by Chris Johns

Description: modified (diff)

Reformatting changes.

comment:14 Changed on 04/03/17 at 23:46:36 by Chris Johns

Description: modified (diff)

Add a link from pending tasks to Tasks Without Tickets.

comment:15 Changed on 04/03/17 at 23:48:56 by Chris Johns

Description: modified (diff)

comment:16 Changed on 04/03/17 at 23:52:34 by Joel Sherrill

Description: modified (diff)

comment:17 Changed on 04/03/17 at 23:54:36 by Joel Sherrill

Description: modified (diff)

comment:18 Changed on 04/04/17 at 15:27:34 by Joel Sherrill

Description: modified (diff)

comment:19 Changed on 04/04/17 at 15:33:15 by Joel Sherrill

Description: modified (diff)

comment:20 Changed on 04/04/17 at 15:42:36 by Joel Sherrill

Description: modified (diff)

comment:21 Changed on 12/03/18 at 15:44:56 by Gedare Bloom

Owner: changed from joel to Joel Sherrill

comment:22 Changed on 12/07/18 at 17:39:29 by taneka zenon hans

Hi! I have added a ticket #3642 (Add iswalnum(), iswalpha() ... (and 10 others) to <wchar.h> header). Hopefully I could get someone to help add it into the description as I don't have the edit permission. Thank you!

comment:23 Changed on 12/09/18 at 14:29:59 by taneka zenon hans

Hi, because I do not have admin rights to modify the description, could someone help me add the following to the description? Thank you!

The previous task of adding POSIX compliance tests (#2262) have been divided into subtasks each focusing on different header files. These subtasks were used in the GCI 2018 as tasks and majority have been completed. Therefore, the task has been changed to fixing the bugs identified and adding any incomplete tests.

comment:24 Changed on 12/10/18 at 07:37:46 by taneka zenon hans

Hi, because I do not have admin rights to modify the description, could someone help me add the following ticket to the Active tasks list?

#3656 Function prototypes for posix_fadvise() and posix_fallocate() missing in <fcntl.h> header file

comment:25 Changed on 01/14/20 at 21:12:57 by Joel Sherrill

Keywords: kernel added

comment:26 Changed on 02/28/20 at 16:35:24 by Joel Sherrill

Description: modified (diff)

comment:27 Changed on 02/28/20 at 16:37:49 by Joel Sherrill

Description: modified (diff)

comment:28 Changed on 12/03/21 at 20:13:39 by Joel Sherrill

Description: modified (diff)

comment:29 Changed on 02/03/22 at 20:10:38 by Gedare Bloom

Keywords: small large added
Note: See TracTickets for help on using tickets.