[RTEMS Project] #2966: POSIX Compliance

RTEMS trac trac at rtems.org
Sun Apr 2 16:31:45 UTC 2017


#2966: POSIX Compliance
---------------------+-------------------------
 Reporter:  aditya   |       Owner:  (none)
     Type:  project  |      Status:  new
 Priority:  normal   |   Milestone:  Indefinite
Component:  General  |     Version:  4.12
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+-------------------------
Changes (by Joel Sherrill):

 * version:  4.11 => 4.12


Old description:

> =  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
> Newlib.
>
> '''Goal:''' Improve POSIX compliance of RTEMS and Newlib.
>
> '''Requirements:'''
>
> 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.
>
> 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,
> feupdateenv
>   * 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()
> http://pubs.opengroup.org/onlinepubs/009695399/functions/getdate.html]
> 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
> manner.
>
> = 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
> Specification]
>  * http://www.opengroup.org/testing/downloads.html
>  * [http://www.opengroup.org/face FACE Consortium]

New description:

 =  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
 Newlib.

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

 '''Requirements:'''

 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 following spreadsheet:

 * https://goo.gl/AXrnxO

 which was created against Issue 3 of the Single Unix Specification and an
 old version of RTEMS. It needs to be updated to Issue 4/POSIX 2013 and a
 new version of RTEMS.

 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.

 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)
 * improved support at the API level for CLOCK_MONOTONIC
   * This impacts timer_create() and at least pthread_condvar_timedwait
 * List IO

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


 * pthread_getcpuclockid()
 * pthread_setschedprio()
 * 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,
 feupdateenv
   * 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()
 http://pubs.opengroup.org/onlinepubs/009695399/functions/getdate.html]
 needs to be turned on in newlib
 * dbm.h is missing. May be an addon library via RSB

 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
 manner.

 = 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
 Specification]
  * http://www.opengroup.org/testing/downloads.html
  * [http://www.opengroup.org/face FACE Consortium]

--

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


More information about the bugs mailing list