On 2014-03-06 20:27, Joel Sherrill wrote:
+ cpukit/libcsupport/src/privateenv.c
   - Uses rtems_global_user_env. Switch to POSIX Keys?

We can use POSIX keys, or do some optimization:

Since applications using a file system will very likely also enable the Newlib re-entrancy we can re-use the __getreent() function for the file system environment. In newlib_create_hook() we create a structure

struct S {
  struct _reent reent;
  rtems_user_env_t *env;
}

and assign it to thread->libc_reent;

The file system can then use

(struct S *) __getreent()

to get its file system environment. This approach allows a slightly faster lock-up compared to POSIX keys and uses less memory.

+ cpukit/score/include/rtems/score/threadimpl.h

/**
 *  Self for the GNU Ada Run-Time
 */
SCORE_EXTERN void *rtems_ada_self;

This should be replaced with a function:

  void *rtems_ada_self(void)
  {
    return _Thread_Get_executing()->rtems_ada_self;
  }

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to