<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/thread, branch v1.0.4</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>work around constant folding bug 61144 in gcc 4.9.0 and 4.9.1</title>
<updated>2014-07-28T04:27:59+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-07-17T01:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5ee811110444a615bbbf84a3daacccf734e4ef2c'/>
<id>5ee811110444a615bbbf84a3daacccf734e4ef2c</id>
<content type='text'>
previously we detected this bug in configure and issued advice for a
workaround, but this turned out not to work. since then gcc 4.9.0 has
appeared in several distributions, and now 4.9.1 has been released
without a fix despite this being a wrong code generation bug which is
supposed to be a release-blocker, per gcc policy.

since the scope of the bug seems to affect only data objects (rather
than functions) whose definitions are overridable, and there are only
a very small number of these in musl, I am just changing them from
const to volatile for the time being. simply removing the const would
be sufficient to make gcc 4.9.1 work (the non-const case was
inadvertently fixed as part of another change in gcc), and this would
also be sufficient with 4.9.0 if we forced -O0 on the affected files
or on the whole build. however it's cleaner to just remove all the
broken compiler detection and use volatile, which will ensure that
they are never constant-folded. the quality of a non-broken compiler's
output should not be affected except for the fact that these objects
are no longer const and thus possibly add a few bytes to data/bss.

this change can be reconsidered and possibly reverted at some point in
the future when the broken gcc versions are no longer relevant.

(cherry picked from commit a6adb2bcd8145353943377d6119c1d7a4242bae1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
previously we detected this bug in configure and issued advice for a
workaround, but this turned out not to work. since then gcc 4.9.0 has
appeared in several distributions, and now 4.9.1 has been released
without a fix despite this being a wrong code generation bug which is
supposed to be a release-blocker, per gcc policy.

since the scope of the bug seems to affect only data objects (rather
than functions) whose definitions are overridable, and there are only
a very small number of these in musl, I am just changing them from
const to volatile for the time being. simply removing the const would
be sufficient to make gcc 4.9.1 work (the non-const case was
inadvertently fixed as part of another change in gcc), and this would
also be sufficient with 4.9.0 if we forced -O0 on the affected files
or on the whole build. however it's cleaner to just remove all the
broken compiler detection and use volatile, which will ensure that
they are never constant-folded. the quality of a non-broken compiler's
output should not be affected except for the fact that these objects
are no longer const and thus possibly add a few bytes to data/bss.

this change can be reconsidered and possibly reverted at some point in
the future when the broken gcc versions are no longer relevant.

(cherry picked from commit a6adb2bcd8145353943377d6119c1d7a4242bae1)
</pre>
</div>
</content>
</entry>
<entry>
<title>prepare pthread_create.c for cherry-picking from master</title>
<updated>2014-07-28T04:25:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-07-28T04:25:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5987b6824359fa2a8b3ba715f1bdfab141c8d8c3'/>
<id>5987b6824359fa2a8b3ba715f1bdfab141c8d8c3</id>
<content type='text'>
this change is harmless and allows commit
a6adb2bcd8145353943377d6119c1d7a4242bae1 to apply without conflicts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this change is harmless and allows commit
a6adb2bcd8145353943377d6119c1d7a4242bae1 to apply without conflicts.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix deadlock race in pthread_once</title>
<updated>2014-04-16T06:46:06+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-16T00:42:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=6ca7c837aa798cc610550b199d4db638605f17f2'/>
<id>6ca7c837aa798cc610550b199d4db638605f17f2</id>
<content type='text'>
at the end of successful pthread_once, there was a race window during
which another thread calling pthread_once would momentarily change the
state back from 2 (finished) to 1 (in-progress). in this case, the
status was immediately changed back, but with no wake call, meaning
that waiters which arrived during this short window could block
forever. there are two possible fixes. one would be adding the wake to
the code path where it was missing. but it's better just to avoid
reverting the status at all, by using compare-and-swap instead of
swap.

(cherry picked from commit 0d0c2f40344640a2a6942dda156509593f51db5d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
at the end of successful pthread_once, there was a race window during
which another thread calling pthread_once would momentarily change the
state back from 2 (finished) to 1 (in-progress). in this case, the
status was immediately changed back, but with no wake call, meaning
that waiters which arrived during this short window could block
forever. there are two possible fixes. one would be adding the wake to
the code path where it was missing. but it's better just to avoid
reverting the status at all, by using compare-and-swap instead of
swap.

(cherry picked from commit 0d0c2f40344640a2a6942dda156509593f51db5d)
</pre>
</div>
</content>
</entry>
<entry>
<title>rename superh port to "sh" for consistency</title>
<updated>2014-02-28T03:03:25+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-02-28T03:03:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=aacd348637e38795dd7ae3c7c8c908d8c0cd24fd'/>
<id>aacd348637e38795dd7ae3c7c8c908d8c0cd24fd</id>
<content type='text'>
linux, gcc, etc. all use "sh" as the name for the superh arch. there
was already some inconsistency internally in musl: the dynamic linker
was searching for "ld-musl-sh.path" as its path file despite its own
name being "ld-musl-superh.so.1". there was some sentiment in both
directions as to how to resolve the inconsistency, but overall "sh"
was favored.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
linux, gcc, etc. all use "sh" as the name for the superh arch. there
was already some inconsistency internally in musl: the dynamic linker
was searching for "ld-musl-sh.path" as its path file despite its own
name being "ld-musl-superh.so.1". there was some sentiment in both
directions as to how to resolve the inconsistency, but overall "sh"
was favored.
</pre>
</div>
</content>
</entry>
<entry>
<title>superh port</title>
<updated>2014-02-23T22:15:54+00:00</updated>
<author>
<name>Bobby Bingham</name>
<email>koorogi@koorogi.info</email>
</author>
<published>2013-10-05T10:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=3a3c813e08d808224c12fd0e9104aeff7c45c9a7'/>
<id>3a3c813e08d808224c12fd0e9104aeff7c45c9a7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mostly-cosmetic fixups to x32 port merge</title>
<updated>2014-02-23T10:43:09+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-02-23T10:43:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=d8b587796f7cfa0c3aa780ad19afe2e30ce84a09'/>
<id>d8b587796f7cfa0c3aa780ad19afe2e30ce84a09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>x32 port (diff against vanilla x86_64)</title>
<updated>2014-02-23T10:09:16+00:00</updated>
<author>
<name>rofl0r</name>
<email>retnyg@gmx.net</email>
</author>
<published>2014-01-07T21:53:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=664cd341921007cea52c8891f27ce35927dca378'/>
<id>664cd341921007cea52c8891f27ce35927dca378</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>import vanilla x86_64 code as x32</title>
<updated>2014-02-23T10:07:18+00:00</updated>
<author>
<name>rofl0r</name>
<email>retnyg@gmx.net</email>
</author>
<published>2014-01-07T21:43:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=323272db175204b951f119dae4bd99ef05e20f13'/>
<id>323272db175204b951f119dae4bd99ef05e20f13</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use syscall_arg_t type for syscall prototypes in pthread code</title>
<updated>2014-02-22T11:25:07+00:00</updated>
<author>
<name>rofl0r</name>
<email>retnyg@gmx.net</email>
</author>
<published>2014-01-07T23:26:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=3b168ce1fbff75e509a9730b27ee22e8bbd9fb8f'/>
<id>3b168ce1fbff75e509a9730b27ee22e8bbd9fb8f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>clone: make clone a wrapper around __clone</title>
<updated>2014-02-10T02:07:43+00:00</updated>
<author>
<name>Bobby Bingham</name>
<email>koorogi@koorogi.info</email>
</author>
<published>2014-02-07T04:11:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=fdf5f1b13123883ac1d5e298e5f32c7ed43578ce'/>
<id>fdf5f1b13123883ac1d5e298e5f32c7ed43578ce</id>
<content type='text'>
The architecture-specific assembly versions of clone did not set errno on
failure, which is inconsistent with glibc.  __clone still returns the error
via its return value, and clone is now a wrapper that sets errno as needed.
The public clone has also been moved to src/linux, as it's not directly
related to the pthreads API.

__clone is called by pthread_create, which does not report errors via
errno.  Though not strictly necessary, it's nice to avoid clobbering errno
here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The architecture-specific assembly versions of clone did not set errno on
failure, which is inconsistent with glibc.  __clone still returns the error
via its return value, and clone is now a wrapper that sets errno as needed.
The public clone has also been moved to src/linux, as it's not directly
related to the pthreads API.

__clone is called by pthread_create, which does not report errors via
errno.  Though not strictly necessary, it's nice to avoid clobbering errno
here.
</pre>
</div>
</content>
</entry>
</feed>
