[PATCH, newlib] Allow locking routine to be retargeted

Freddie Chopin freddie_chopin@op.pl
Thu Nov 10 15:34:00 GMT 2016


Hi Thomas!

Why don't you do the same thing for recursive functions? At least the
lock used by malloc() has to be recursive, so with your patch exactly
all mutexes should be recursive too.

I have doubts about practical implementation of these functions for any
RTOS, because of the __LOCK_INIT() macro used for initialization. In
every retargeted function you'll have to start critical section (most
likely by disabling interrupts) to initialize the object on heap, but
then how would you use heap if malloc()'s lock is used via these
functions too?

Regards,
FCh



More information about the Newlib mailing list