<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/thread, branch v0.7.12</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>fix useless use of potentially-uninitialized mode variable in sem_open</title>
<updated>2011-06-26T20:34:05+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-26T20:34:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=6e53a6eca42ec40d12dced55f4840df883e2f76e'/>
<id>6e53a6eca42ec40d12dced55f4840df883e2f76e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>restore use of .type in asm, but use modern @function (vs %function)</title>
<updated>2011-06-15T03:15:08+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-15T03:15:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=c7d19f9923c66a2ddb47272f1e8fec8b804f54c4'/>
<id>c7d19f9923c66a2ddb47272f1e8fec8b804f54c4</id>
<content type='text'>
this seems to be necessary to make the linker accept the functions in
a shared library (perhaps to generate PLT entries?)

strictly speaking libc-internal asm should not need it. i might clean
that up later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this seems to be necessary to make the linker accept the functions in
a shared library (perhaps to generate PLT entries?)

strictly speaking libc-internal asm should not need it. i might clean
that up later.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix race condition in pthread_kill</title>
<updated>2011-06-14T05:35:51+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-14T05:35:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7779dbd2663269b465951189b4f43e70839bc073'/>
<id>7779dbd2663269b465951189b4f43e70839bc073</id>
<content type='text'>
if thread id was reused by the kernel between the time pthread_kill
read it from the userspace pthread_t object and the time of the tgkill
syscall, a signal could be sent to the wrong thread. the tgkill
syscall was supposed to prevent this race (versus the old tkill
syscall) but it can't; it can only help in the case where the tid is
reused in a different process, but not when the tid is reused in the
same process.

the only solution i can see is an extra lock to prevent threads from
exiting while another thread is trying to pthread_kill them. it should
be very very cheap in the non-contended case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if thread id was reused by the kernel between the time pthread_kill
read it from the userspace pthread_t object and the time of the tgkill
syscall, a signal could be sent to the wrong thread. the tgkill
syscall was supposed to prevent this race (versus the old tkill
syscall) but it can't; it can only help in the case where the tid is
reused in a different process, but not when the tid is reused in the
same process.

the only solution i can see is an extra lock to prevent threads from
exiting while another thread is trying to pthread_kill them. it should
be very very cheap in the non-contended case.
</pre>
</div>
</content>
</entry>
<entry>
<title>run dtors before taking the exit-lock in pthread exit</title>
<updated>2011-06-14T05:25:17+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-14T05:25:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f58c8a0f391987a65e055ae591ec59b9df7b7f7c'/>
<id>f58c8a0f391987a65e055ae591ec59b9df7b7f7c</id>
<content type='text'>
previously a long-running dtor could cause pthread_detach to block.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
previously a long-running dtor could cause pthread_detach to block.
</pre>
</div>
</content>
</entry>
<entry>
<title>minor locking optimizations</title>
<updated>2011-06-14T05:23:42+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-14T05:23:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=6232b96f5153d0b718054a8bc569fcd7d596bab2'/>
<id>6232b96f5153d0b718054a8bc569fcd7d596bab2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove all .size and .type directives for functions from the asm</title>
<updated>2011-06-14T00:28:14+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-06-14T00:28:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=1e4f1cf154d18d2bd13cd4524a8bbae6786efd02'/>
<id>1e4f1cf154d18d2bd13cd4524a8bbae6786efd02</id>
<content type='text'>
these are useless and have caused problems for users trying to build
with non-gnu tools like tcc's assembler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these are useless and have caused problems for users trying to build
with non-gnu tools like tcc's assembler.
</pre>
</div>
</content>
</entry>
<entry>
<title>implement pthread_[sg]etconcurrency.</title>
<updated>2011-05-30T15:31:07+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-05-30T15:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ddd87b2f10baf35ed32917bd488be8bf53ad0cc3'/>
<id>ddd87b2f10baf35ed32917bd488be8bf53ad0cc3</id>
<content type='text'>
there is a resource limit of 0 bits to store the concurrency level
requested. thus any positive level exceeds a resource limit, resulting
in EAGAIN. :-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
there is a resource limit of 0 bits to store the concurrency level
requested. thus any positive level exceeds a resource limit, resulting
in EAGAIN. :-)
</pre>
</div>
</content>
</entry>
<entry>
<title>optimize out useless default-attribute object in pthread_create</title>
<updated>2011-05-08T03:39:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-05-08T03:39:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=11e4b92556a02f43b500e6815690354b0f710843'/>
<id>11e4b92556a02f43b500e6815690354b0f710843</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>optimize compound-literal sigset_t's not to contain useless hurd bits</title>
<updated>2011-05-08T03:37:10+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-05-08T03:37:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=4c4e22d781d75a461097cccc2ecac5adbafb1a59'/>
<id>4c4e22d781d75a461097cccc2ecac5adbafb1a59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>overhaul implementation-internal signal protections</title>
<updated>2011-05-08T03:23:58+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-05-08T03:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=99b8a25e941e54537bf39ca2f265c345f393f112'/>
<id>99b8a25e941e54537bf39ca2f265c345f393f112</id>
<content type='text'>
the new approach relies on the fact that the only ways to create
sigset_t objects without invoking UB are to use the sig*set()
functions, or from the masks returned by sigprocmask, sigaction, etc.
or in the ucontext_t argument to a signal handler. thus, as long as
sigfillset and sigaddset avoid adding the "protected" signals, there
is no way the application will ever obtain a sigset_t including these
bits, and thus no need to add the overhead of checking/clearing them
when sigprocmask or sigaction is called.

note that the old code actually *failed* to remove the bits from
sa_mask when sigaction was called.

the new implementations are also significantly smaller, simpler, and
faster due to ignoring the useless "GNU HURD signals" 65-1024, which
are not used and, if there's any sanity in the world, never will be
used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the new approach relies on the fact that the only ways to create
sigset_t objects without invoking UB are to use the sig*set()
functions, or from the masks returned by sigprocmask, sigaction, etc.
or in the ucontext_t argument to a signal handler. thus, as long as
sigfillset and sigaddset avoid adding the "protected" signals, there
is no way the application will ever obtain a sigset_t including these
bits, and thus no need to add the overhead of checking/clearing them
when sigprocmask or sigaction is called.

note that the old code actually *failed* to remove the bits from
sa_mask when sigaction was called.

the new implementations are also significantly smaller, simpler, and
faster due to ignoring the useless "GNU HURD signals" 65-1024, which
are not used and, if there's any sanity in the world, never will be
used.
</pre>
</div>
</content>
</entry>
</feed>
