a question about the implementation of errno

lihuiba magazine.lihuiba@163.com
Wed Jul 4 05:07:00 GMT 2018


Hi all,


I noticed recently that errno is implemented as a macro that expands to (*__errno_location()).
I wonder why it is implemented as this, and why it is not a thread-local int variable.
I suppose thread-local int is faster than function all.


Thanks!




Huiba Li


More information about the Libc-help mailing list