This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re-entrancy problems


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]