[RTEMS Project] #2966: POSIX Compliance

RTEMS trac trac at rtems.org
Sun Apr 2 16:02:18 UTC 2017

#2966: POSIX Compliance
 Reporter:  aditya   |      Owner:  (none)
     Type:  project  |     Status:  new
 Priority:  normal   |  Milestone:  Indefinite
Component:  General  |    Version:  4.11
 Severity:  normal   |   Keywords:
 =  Improve POSIX Compliance =

 [[TOC(Developer/Projects/Open/POSIXCompliance, depth=2)]]

 '''Mentors:''' Joel Sherrill

 '''Students:''' Past, Present, and Potential Students

 '''Status:''' More to do.

 '''Introduction:''' Increase the POSIX functions supported by RTEMS and

 '''Goal:''' Improve POSIX compliance of RTEMS and Newlib.


 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

 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.

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

 * rename() (Ticket #2169)
 * dup2() and dup() (Ticket #2158)
 * List IO

 RTEMS is missing a few POSIX methods which could be supported:

 * pthread_condattr_getclock()
 * pthread_condattr_setclock()
 * pthread_getcpuclockid()
 * pthread_setschedprio()
 * pthread_getconcurrency()
 * pthread_setconcurrency()
 * improved support at the API level for CLOCK_MONOTONIC
   * This impacts timer_create() and at least pthread_condvar_timedwait
 * Are all methods in signal.h possible provided?
 * posix_devctl() - in a POSIX annex, ioctl() is not in POSIX.
 * mmap() - Chris Johns has identified a subset of this family of methods
 which can work without an MMU.

 Newlib also has some known issues:

 * inttypes.h defines some methods which are not present
   * strtoimax, strtoumax, wcstoimax, wcstoumax
 * fenv.h is not present
   * http://pubs.opengroup.org/onlinepubs/9699919799/
   * feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept,
 feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept,
   * Cygwin has x86 implementation. FreeBSD should be source for ARM and
 some other architectures
 * math.h missing some methods
   * long double complex methods
 * search.h is missing some methods
   * Double check newlib. It has search source directory. May now be OK.
 * sys/statvfs.h is missing
   * Implementation would likely be in RTEMS
 * some random number calls are missing
 * ftw.h is not present
   * http://pubs.opengroup.org/onlinepubs/9699919799/

 * fstatvfs is missing at least a prototype in the right place
 * [getdate()
 needs to be turned on in newlib

 The missing inttypes.h methods and a number of others could be simple
 cases of getting code from
 [http://fxr.watson.org/fxr/source/stdlib/l64a.c?v=FREEBSD-LIBC FreeBSD].
 complex.h could come from FreeBSD: https://wiki.freebsd.org/Numerics

 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

 = Testing =

 * 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
 [http://www.opengroup.org/face FACE Consortium] has defined four POSIX
 profiles. RTEMS can support most of the methods in the largest profile
 (General Purpose).

 = References =
  * [http://pubs.opengroup.org/onlinepubs/9699919799/ Single UNIX
  * http://www.opengroup.org/testing/downloads.html
  * [http://www.opengroup.org/face FACE Consortium]

Ticket URL: <http://devel.rtems.org/ticket/2966>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list