signals and _REENT

Freddie Chopin freddie_chopin@op.pl
Mon Mar 2 09:47:00 GMT 2015


On 02/27/2015 11:56 PM, Jeff Johnston wrote:
> Modified patch attached.

Does the lock really have to be recursive? It seems that it would be 
possible to use non-recursive version. I see _init_signal_r() is the 
only place where lock is re-acquired recursively, so this function can 
either be made private (static)* - no code in newlib calls it and it's 
not prototyped in any header - or it could be converted to a wrapper for 
new static function which would _NOT_ use locking, the locks would be 
acquired externally and all functions from signal.c would just call this 
new "internal" version.

* - in that case locks could be added to _init_signal(), but this 
function also doesn't seem to be used, there's also no prototype in any 
header...

Regards,
FCh



More information about the Newlib mailing list