[Bug 1247] New: RTEMS does not implement locks needed by multithreaded newlib

rtems-bugs at rtems.org rtems-bugs at rtems.org
Sun Jun 17 04:43:24 UTC 2007


http://www.rtems.org/bugzilla/show_bug.cgi?id=1247

           Summary: RTEMS does not implement locks needed by multithreaded
                    newlib
           Product: RTEMS
           Version: 4.7
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: critical
          Priority: P1
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: strauman at slac.stanford.edu


multi-threaded newlib protects a number of internal data structures
(as of newlib-1.15 these comprise:
 - global list of FILE objects
 - stdio FILE object initializer
 - individual FILEs [since FILEs with the exception of
   stdin/stdout/stderr are per-process entities]
 - global hash table used by telldir/seekdir
 - individual DIR structures (opendir/readdir)
 - atexit list
 - list of environment variables
 - global timezone variable
)
using mutexes. It expects the OS to implement these locks but defaults
to not using locking if the OS does not provide an implementation.
Currently, RTEMS does *not* provide its own implementation of 'sys/lock.h'
and therefore vital data structures in newlib are currently *unprotected*
(with the exception of environment variables -- 'envlock.c' had been
added to RTEMS a while ago but since then, newlib has introduced more
locks and a general OS interface which - once implemented - will obsolete
'envlock.c').

Note that while semantics of having no protection for individual FILE
objects may be tolerable, having no protection for global newlib data
structures such as lists of FILEs is not acceptable.

I am currently working on an implementation which should be available shortly.


-- 
Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the bugs mailing list