This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Re-entrancy problems
- To: joel dot sherrill at oarcorp dot com
- Subject: Re: Re-entrancy problems
- From: Mats Liljegren <mats dot liljegren at enea dot se>
- Date: Mon, 04 Dec 2000 10:32:24 +0100
- CC: newlib <newlib at sources dot redhat dot com>
- Organization: Enea Realtime AB
- References: <3A27BC6B.83F32518@enea.se> <3A27C41D.2899662F@OARcorp.com>
Thanks for your quick response!
Some comments below:
> Unless you stick with XXX_r() functions, reentrancy support must
> be provided as part of the by the underlying libgloss layer.
> Powerpc-eabi probably does not have per-thread/process reentrancy
> support.
I saw something about a global pointer that needs updating. I've thought
about this, but haven't come up with a good solution for doing this. The
problem is that this has to be done for every task switch, which means
that it should be really fast. A really fast method would be to
pre-allocate a re-entrancy structure for each process that could be
created. By using the process ID, you could index this structure.
But as the maximum process ID for my OS is a 32 bit value, this would
take more memory than I have...
Is there anyone else that knows of a better solution?
> newlib 1.8.2 has some support locking that with a mutex but that
> requires target specific glue also.
How does this glue work? I haven't seen this in the documentation I
have.
Regards,
Mats