<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/errno, branch master</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>strerror: add error strings for EUCLEAN and ENAVAIL</title>
<updated>2024-08-11T02:08:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2024-08-11T02:08:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=c851b268bd9b9021599ecfdf0b8a43a3ab60d661'/>
<id>c851b268bd9b9021599ecfdf0b8a43a3ab60d661</id>
<content type='text'>
while not the only error codes presently omitted, these two are
particularly likely to be encountered in the wild.

EUCLEAN is used by linux filesystem and device drivers to report
filesystem structure corruption or data corruption.

ENAVAIL is used by some linux drivers to indicate non-availability of
a resource.

both names are new inventions to correspond to how they are actually
used, as the original kernel strings ("Structure needs cleaning" and
"No XENIX semaphores available") are not remotely meaningful or
reasonable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
while not the only error codes presently omitted, these two are
particularly likely to be encountered in the wild.

EUCLEAN is used by linux filesystem and device drivers to report
filesystem structure corruption or data corruption.

ENAVAIL is used by some linux drivers to indicate non-availability of
a resource.

both names are new inventions to correspond to how they are actually
used, as the original kernel strings ("Structure needs cleaning" and
"No XENIX semaphores available") are not remotely meaningful or
reasonable.
</pre>
</div>
</content>
</entry>
<entry>
<title>add missing strerror text for key management</title>
<updated>2022-02-20T00:42:21+00:00</updated>
<author>
<name>pelco</name>
<email>me@pedroo.net</email>
</author>
<published>2022-02-16T23:06:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5690668a1bb9f551bb78d825bc804dcebe84b7e7'/>
<id>5690668a1bb9f551bb78d825bc804dcebe84b7e7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>improve strerror speed</title>
<updated>2020-03-15T01:23:37+00:00</updated>
<author>
<name>Timo Teräs</name>
<email>timo.teras@iki.fi</email>
</author>
<published>2020-03-04T09:27:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=8343334d7b9cd4338bdac80e17be079cbc675ec3'/>
<id>8343334d7b9cd4338bdac80e17be079cbc675ec3</id>
<content type='text'>
change the current O(n) lookup to O(1) based on the machinery
described in "How To Write Shared Libraries" (Appendix B).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
change the current O(n) lookup to O(1) based on the machinery
described in "How To Write Shared Libraries" (Appendix B).
</pre>
</div>
</content>
</entry>
<entry>
<title>add hidden version of &amp;errno accessor function</title>
<updated>2018-09-15T03:08:53+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2018-09-15T03:08:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e13063aad7aee341d278d2a879a76ec7b59b2ad8'/>
<id>e13063aad7aee341d278d2a879a76ec7b59b2ad8</id>
<content type='text'>
this significantly improves codegen in functions that need to access
errno but otherwise have no need for a GOT pointer.

we could probably improve it much more by including an inline version
of the &amp;errno accessor function, but that depends on having the
definitions of struct __pthread and __pthread_self(), which at present
would expose a lot more than is appropriate. moving them to a small
tls.h later might make this more reasonable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this significantly improves codegen in functions that need to access
errno but otherwise have no need for a GOT pointer.

we could probably improve it much more by including an inline version
of the &amp;errno accessor function, but that depends on having the
definitions of struct __pthread and __pthread_self(), which at present
would expose a lot more than is appropriate. moving them to a small
tls.h later might make this more reasonable.
</pre>
</div>
</content>
</entry>
<entry>
<title>reduce spurious inclusion of libc.h</title>
<updated>2018-09-12T18:34:37+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2018-09-12T04:08:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5ce3737931bb411a8d167356d4d0287b53b0cbdc'/>
<id>5ce3737931bb411a8d167356d4d0287b53b0cbdc</id>
<content type='text'>
libc.h was intended to be a header for access to global libc state and
related interfaces, but ended up included all over the place because
it was the way to get the weak_alias macro. most of the inclusions
removed here are places where weak_alias was needed. a few were
recently introduced for hidden. some go all the way back to when
libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented)
cancellation points had to include it.

remaining spurious users are mostly callers of the LOCK/UNLOCK macros
and files that use the LFS64 macro to define the awful *64 aliases.

in a few places, new inclusion of libc.h is added because several
internal headers no longer implicitly include libc.h.

declarations for __lockfile and __unlockfile are moved from libc.h to
stdio_impl.h so that the latter does not need libc.h. putting them in
libc.h made no sense at all, since the macros in stdio_impl.h are
needed to use them correctly anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libc.h was intended to be a header for access to global libc state and
related interfaces, but ended up included all over the place because
it was the way to get the weak_alias macro. most of the inclusions
removed here are places where weak_alias was needed. a few were
recently introduced for hidden. some go all the way back to when
libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented)
cancellation points had to include it.

remaining spurious users are mostly callers of the LOCK/UNLOCK macros
and files that use the LFS64 macro to define the awful *64 aliases.

in a few places, new inclusion of libc.h is added because several
internal headers no longer implicitly include libc.h.

declarations for __lockfile and __unlockfile are moved from libc.h to
stdio_impl.h so that the latter does not need libc.h. putting them in
libc.h made no sense at all, since the macros in stdio_impl.h are
needed to use them correctly anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix missing strerror text for EMULTIHOP</title>
<updated>2018-08-23T19:56:52+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2018-08-23T19:56:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f4542fdf7a10632099f0c4e49b4c5923ca29356b'/>
<id>f4542fdf7a10632099f0c4e49b4c5923ca29356b</id>
<content type='text'>
this is an obsolete error code from RFS, an obsolete predecessor of
NFS. POSIX documents it only as "Reserved", but maintains the
requirement that it be defined. as long as it is defined, it needs a
string for strerror to produce; the one chosen matches glibc and
documentation from other language runtimes I could find.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is an obsolete error code from RFS, an obsolete predecessor of
NFS. POSIX documents it only as "Reserved", but maintains the
requirement that it be defined. as long as it is defined, it needs a
string for strerror to produce; the one chosen matches glibc and
documentation from other language runtimes I could find.
</pre>
</div>
</content>
</entry>
<entry>
<title>add public interface headers to implementation files</title>
<updated>2018-02-26T02:17:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2018-02-26T02:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=57b97b42bdecafd81c4967a10aef6eaf43d3fcb8'/>
<id>57b97b42bdecafd81c4967a10aef6eaf43d3fcb8</id>
<content type='text'>
general policy is that all source files defining a public API or an
ABI mechanism referenced by a public header should include the public
header that declares the interface, so that the compiler or analysis
tools can check the consistency of the declarations. Alexander Monakov
pointed out a number of violations of this principle a few years back.
fix them now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
general policy is that all source files defining a public API or an
ABI mechanism referenced by a public header should include the public
header that declares the interface, so that the compiler or analysis
tools can check the consistency of the declarations. Alexander Monakov
pointed out a number of violations of this principle a few years back.
fix them now.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove remnants of support for running in no-thread-pointer mode</title>
<updated>2015-04-13T23:24:51+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2015-04-13T23:24:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54'/>
<id>19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54</id>
<content type='text'>
since 1.1.0, musl has nominally required a thread pointer to be setup.
most of the remaining code that was checking for its availability was
doing so for the sake of being usable by the dynamic linker. as of
commit 71f099cb7db821c51d8f39dfac622c61e54d794c, this is no longer
necessary; the thread pointer is now valid before any libc code
(outside of dynamic linker bootstrap functions) runs.

this commit essentially concludes "phase 3" of the "transition path
for removing lazy init of thread pointer" project that began during
the 1.1.0 release cycle.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since 1.1.0, musl has nominally required a thread pointer to be setup.
most of the remaining code that was checking for its availability was
doing so for the sake of being usable by the dynamic linker. as of
commit 71f099cb7db821c51d8f39dfac622c61e54d794c, this is no longer
necessary; the thread pointer is now valid before any libc code
(outside of dynamic linker bootstrap functions) runs.

this commit essentially concludes "phase 3" of the "transition path
for removing lazy init of thread pointer" project that began during
the 1.1.0 release cycle.
</pre>
</div>
</content>
</entry>
<entry>
<title>add support for LC_TIME and LC_MESSAGES translations</title>
<updated>2014-07-26T09:36:25+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-07-26T09:36:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=c5b8f1930512d206a7c1cf1093a4a47e1722a414'/>
<id>c5b8f1930512d206a7c1cf1093a4a47e1722a414</id>
<content type='text'>
for LC_MESSAGES, translation of strerror and similar literal message
functions is supported. for messages in other places (particularly the
dynamic linker) that use format strings, translation is not yet
supported. in order to make it possible and safe, such messages will
need to be refactored to separate the textual content from the format.

for LC_TIME, the day and month names and strftime-style format strings
provided by nl_langinfo are supported for translation. however there
may be limitations, as some of the original C-locale nl_langinfo
strings are non-unique and thus perhaps non-suitable as keys.

overall, the locale support activated by this commit should not be
seen as complete and polished but as a basis for beginning to test
locale functionality and implement locales.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for LC_MESSAGES, translation of strerror and similar literal message
functions is supported. for messages in other places (particularly the
dynamic linker) that use format strings, translation is not yet
supported. in order to make it possible and safe, such messages will
need to be refactored to separate the textual content from the format.

for LC_TIME, the day and month names and strftime-style format strings
provided by nl_langinfo are supported for translation. however there
may be limitations, as some of the original C-locale nl_langinfo
strings are non-unique and thus perhaps non-suitable as keys.

overall, the locale support activated by this commit should not be
seen as complete and polished but as a basis for beginning to test
locale functionality and implement locales.
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify errno implementation</title>
<updated>2014-06-10T08:49:49+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-06-10T08:49:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ac31bf278d9ed855e6765bb71d64ed19d2b7c0f8'/>
<id>ac31bf278d9ed855e6765bb71d64ed19d2b7c0f8</id>
<content type='text'>
the motivation for the errno_ptr field in the thread structure, which
this commit removes, was to allow the main thread's errno to keep its
address when lazy thread pointer initialization was used. &amp;errno was
evaluated prior to setting up the thread pointer and stored in
errno_ptr for the main thread; subsequently created threads would have
errno_ptr pointing to their own errno_val in the thread structure.

since lazy initialization was removed, there is no need for this extra
level of indirection; __errno_location can simply return the address
of the thread's errno_val directly. this does cause &amp;errno to change,
but the change happens before entry to application code, and thus is
not observable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the motivation for the errno_ptr field in the thread structure, which
this commit removes, was to allow the main thread's errno to keep its
address when lazy thread pointer initialization was used. &amp;errno was
evaluated prior to setting up the thread pointer and stored in
errno_ptr for the main thread; subsequently created threads would have
errno_ptr pointing to their own errno_val in the thread structure.

since lazy initialization was removed, there is no need for this extra
level of indirection; __errno_location can simply return the address
of the thread's errno_val directly. this does cause &amp;errno to change,
but the change happens before entry to application code, and thus is
not observable.
</pre>
</div>
</content>
</entry>
</feed>
