<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/thread, branch v0.9.3</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>retry on cas failures in sem_trywait</title>
<updated>2012-07-24T04:51:36+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-24T04:51:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=07e62953c768f9f09485388c22ffaed98d11d676'/>
<id>07e62953c768f9f09485388c22ffaed98d11d676</id>
<content type='text'>
this seems counter-intuitive since sem_trywait is supposed to just try
once, not wait for the semaphore. however, the retry loop is not a
wait. instead, it's to handle the case where the value changes due to
a simultaneous post or wait from another thread while the semaphore
value remains positive. in such a case, it's absolutely wrong for
sem_trywait to fail with EAGAIN because the semaphore is not busy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this seems counter-intuitive since sem_trywait is supposed to just try
once, not wait for the semaphore. however, the retry loop is not a
wait. instead, it's to handle the case where the value changes due to
a simultaneous post or wait from another thread while the semaphore
value remains positive. in such a case, it's absolutely wrong for
sem_trywait to fail with EAGAIN because the semaphore is not busy.
</pre>
</div>
</content>
</entry>
<entry>
<title>avoid blx instruction which does not exist on armv4t or armv4</title>
<updated>2012-07-15T00:15:02+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-15T00:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7be3b5a073e77f1147acfa728725f9f81d20ceb0'/>
<id>7be3b5a073e77f1147acfa728725f9f81d20ceb0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix several locks that weren't updated right for new futex-based __lock</title>
<updated>2012-07-12T15:23:43+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T15:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=bbbe87e35cfeef593e23010e35528e722027567f'/>
<id>bbbe87e35cfeef593e23010e35528e722027567f</id>
<content type='text'>
these could have caused memory corruption due to invalid accesses to
the next field. all should be fixed now; I found the errors with fgrep
-r '__lock(&amp;', which is bogus since the argument should be an array.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these could have caused memory corruption due to invalid accesses to
the next field. all should be fixed now; I found the errors with fgrep
-r '__lock(&amp;', which is bogus since the argument should be an array.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix pthread_kill unlocking</title>
<updated>2012-07-12T15:14:12+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T15:14:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=c89f130f39b413d1fb1733166ca63d694685c529'/>
<id>c89f130f39b413d1fb1733166ca63d694685c529</id>
<content type='text'>
it had not been updated for the futex-based locks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
it had not been updated for the futex-based locks
</pre>
</div>
</content>
</entry>
<entry>
<title>fix potential race condition in detached threads</title>
<updated>2012-07-12T03:36:46+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T03:36:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=92f8396b0c8e4f146563b87f46137484cfb36e31'/>
<id>92f8396b0c8e4f146563b87f46137484cfb36e31</id>
<content type='text'>
after the thread unmaps its own stack/thread structure, the kernel,
performing child tid clear and futex wake, could clobber a new mapping
made at the same location as the just-removed thread's tid field.
disable kernel clearing of child tid to prevent this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
after the thread unmaps its own stack/thread structure, the kernel,
performing child tid clear and futex wake, could clobber a new mapping
made at the same location as the just-removed thread's tid field.
disable kernel clearing of child tid to prevent this.
</pre>
</div>
</content>
</entry>
<entry>
<title>mips clone: don't free stack space used to copy arg</title>
<updated>2012-07-12T03:01:09+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T03:01:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a03f69d4456d3ac5120cc07a22af8ecb631444bb'/>
<id>a03f69d4456d3ac5120cc07a22af8ecb631444bb</id>
<content type='text'>
the mips abi reserves stack space equal to the size of the in-register
args for the callee to save the args, if desired. this would cause the
beginning of the thread structure to be clobbered...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the mips abi reserves stack space equal to the size of the in-register
args for the callee to save the args, if desired. this would cause the
beginning of the thread structure to be clobbered...
</pre>
</div>
</content>
</entry>
<entry>
<title>fix mips clone() on real linux kernel</title>
<updated>2012-07-12T02:59:43+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T02:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b58f738bcb5877c83aef49129b40827a1d5ae4c7'/>
<id>b58f738bcb5877c83aef49129b40827a1d5ae4c7</id>
<content type='text'>
the old code worked in qemu app-level emulation, but not on real
kernels where the clone syscall does not copy the register values to
the new thread. save arguments on the new thread stack instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the old code worked in qemu app-level emulation, but not on real
kernels where the clone syscall does not copy the register values to
the new thread. save arguments on the new thread stack instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix clone() on mips (args were in wrong order)</title>
<updated>2012-07-12T00:44:38+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-12T00:44:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=715b6403ce25110d594c7814e9cff860486a6f85'/>
<id>715b6403ce25110d594c7814e9cff860486a6f85</id>
<content type='text'>
with this change, threads on mips seem to be working
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with this change, threads on mips seem to be working
</pre>
</div>
</content>
</entry>
<entry>
<title>first attempt at making threads work on mips</title>
<updated>2012-07-11T15:35:27+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-11T15:35:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5c94367a9b0f1c1dd0deadb0f320242b59f844bb'/>
<id>5c94367a9b0f1c1dd0deadb0f320242b59f844bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>generic c version of __set_thread_area for archs where it works</title>
<updated>2012-07-11T15:34:46+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-11T15:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=d0bfbd9dca27e3053534bbf70b36e229d0c0cf21'/>
<id>d0bfbd9dca27e3053534bbf70b36e229d0c0cf21</id>
<content type='text'>
on other archs, like x86[_64], asm version is required
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
on other archs, like x86[_64], asm version is required
</pre>
</div>
</content>
</entry>
</feed>
