This is the mail archive of the newlib@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH, newlib] Allow locking routine to be retargeted


On Fri, 2017-01-20 at 13:37 +0000, Thomas Preudhomme wrote:
> Hi Freddie,
> 
> Have you had time to work on the last version of the patch?

Hi Thomas!

I did not hae time this week to try it again - I've planned to do that
on the weekend. But from what I've seen the only difference between the
new version and the one I tested last week is the addition of 4 missing
lock objects.

I think that the patch will work, but - as I've said - I'll compile the
toolchain on the weekend and give it a try (;

BTW - maybe it would be possible to make the names of the locks
consistent (in a separate patch)? Internally this changes nothing for
newlib, but for this particular patch it would be nice to have names
like this:

+struct _lock _lock___sinit_recursive_lock;
+struct _lock _lock___sfp_recursive_lock;
+struct _lock _lock___atexit_recursive_lock;
+struct _lock _lock___quick_exit_lock;
+struct _lock _lock___malloc_recursive_lock;
+struct _lock _lock___env_recursive_lock;
+struct _lock _lock___tz_lock;
+struct _lock _lock___dd_hash_lock;

instead of this:

struct _lock _lock___sinit_lock;
struct _lock _lock___sfp_lock;
struct _lock _lock___atexit_lock;
struct _lock _lock_atexit_mutex;
struct _lock _lock___malloc_lock_object;
struct _lock _lock___env_lock_object;
struct _lock _lock___tz_lock_object;
struct _lock _lock_dd_hash_lock;

It's better to change it now than in the future. Exact format does not
matter much, it would be nice to just keep them similar and maybe have
the recursive/normal distinction in the name.

I'll investigate whether or not all locks are always needed, as I think
that some of them are needed only with specific newlib configurations.

Regards,
FCh


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