diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-08-24 21:38:49 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-08-24 21:38:49 -0400 |
commit | 9d0b8b92a508c328e7eac774847f001f80dfb5ff (patch) | |
tree | 14ed37bd3ca0bc6298d76591fc0bf918b4cbe4f2 /src/internal | |
parent | 4d5786544bb52c62fc1ae84d91684ef2268afa05 (diff) | |
download | musl-9d0b8b92a508c328e7eac774847f001f80dfb5ff.tar.gz musl-9d0b8b92a508c328e7eac774847f001f80dfb5ff.tar.bz2 musl-9d0b8b92a508c328e7eac774847f001f80dfb5ff.tar.xz musl-9d0b8b92a508c328e7eac774847f001f80dfb5ff.zip |
make h_errno thread-local
the framework to do this always existed but it was deemed unnecessary
because the only [ex-]standard functions using h_errno were not
thread-safe anyway. however, some of the nonstandard res_* functions
are also supposed to set h_errno to indicate the cause of error, and
were unable to do so because it was not thread-safe. this change is a
prerequisite for fixing them.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/pthread_impl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 5742dfc5..5749a336 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -43,6 +43,7 @@ struct pthread { long off; volatile void *volatile pending; } robust_list; + int h_errno_val; volatile int timer_id; locale_t locale; volatile int killlock[1]; |