This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Consensus on MT-, AS- and AC-Safety docs.


On Wed, 20 Nov 2013, Ondrej Bilka wrote:

> This could be solved by wrapping a handler in function that saves and
> restores errno. You could make functions also safe in this regard or
> decide that implementing solution is too expensive.

The point of an "errno" annotation for AS-safety is that only the user 
writing their signal handler can decide whether saving and restoring errno 
is the right thing to do in their program, depending on whether the signal 
handler calls relevant functions with arguments that might involve a 
change to errno and what code might be interrupted by the signal.  It's 
part of the interface for very many functions, not just in libm, that they 
do, or may, set errno, and so many functions that might otherwise be 
AS-safe will need such an annotation.

-- 
Joseph S. Myers
joseph@codesourcery.com


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