OK.. We can talk code specifics tomorrow in person.

Is gxx_wrappers.c still needed?

On Feb 24, 2014 9:56 AM, Sebastian Huber <sebastian.hu...@embedded-brains.de> 
wrote:
On 2014-02-24 09:09, Joel Sherrill wrote:
>  > > 2. Use alternatives to task variables for all RTEMS support components, 
> e.g.
>  > > the file system environment.  Here we can use __getreent() for example 
> with
>  > >
>  > > struct S {
>  > >   struct _reent reent;
>  > >   rtems_user_env_t env;
>  > > }
>
> I am missing some detail here. Can you provide details?
>

Each thread can have its own file system environment.  So we need some sort of
thread-local storage.  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.

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