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: signals and _REENT


These functions set errno for the caller when an error has occurred.
This would mean a user would have to check the global errno value (not using
the dynamic reentrancy errno macro) which in turn could be changed by
another thread making similar calls and therefore unreliable.

----- Original Message -----
From: "Corinna Vinschen" <vinschen@redhat.com>
To: newlib@sourceware.org
Sent: Tuesday, February 24, 2015 8:30:49 AM
Subject: Re: signals and _REENT

On Feb 21 22:44, Freddie Chopin wrote:
> Hello!
> 
> While browsing newlib's source I noticed that signal-related functions in
> newlib (like signal() or raise()) use _REENT, which is per-thread. Shouldn't
> these functions use _GLOBAL_REENT, which I assume is per-process?

Hmm.  Hard to tell.  I'm not sure about the original intention of
this code.  I *think* you're right, though.  Jeff?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat


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