<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libkse/thread/thr_create.c, branch stable/8</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove hacks to allow libkse to export its symbols in the LIBTHREAD_1_0</title>
<updated>2007-12-16T23:29:57+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2007-12-16T23:29:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3d6d3ed091441cddcca7d6be6afe95715ec2dfc7'/>
<id>3d6d3ed091441cddcca7d6be6afe95715ec2dfc7</id>
<content type='text'>
version namespace which was needed before the library version was
bumped.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
version namespace which was needed before the library version was
bumped.
</pre>
</div>
</content>
</entry>
<entry>
<title>WARNS=3'ify.</title>
<updated>2007-11-30T17:20:29+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2007-11-30T17:20:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eb63e604ea287ed64a1f0d5ad0dc137af8ffa31f'/>
<id>eb63e604ea287ed64a1f0d5ad0dc137af8ffa31f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove 3rd clause, renumber, ok per email</title>
<updated>2007-01-12T07:26:21+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2007-01-12T07:26:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fed32d75449d7d05afdd7ddb7703bfa69a3027f3'/>
<id>fed32d75449d7d05afdd7ddb7703bfa69a3027f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add compatibility symbol maps.  libpthread (.so.1 and .so.2)</title>
<updated>2006-03-13T00:59:51+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2006-03-13T00:59:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e62165c8b0f7d6452c0033127a0fd8ad1d9e34d3'/>
<id>e62165c8b0f7d6452c0033127a0fd8ad1d9e34d3</id>
<content type='text'>
used LIBTHREAD_1_0 as its version definition, but now needs
to define its symbols in the same namespace used by libc.
The compatibility hooks allows you to use libraries and
binaries built and linked to libpthread before libc was
built with symbol versioning.  The shims can be removed if
libpthread is given a version bump.

Reviewed by:	davidxu
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
used LIBTHREAD_1_0 as its version definition, but now needs
to define its symbols in the same namespace used by libc.
The compatibility hooks allows you to use libraries and
binaries built and linked to libpthread before libc was
built with symbol versioning.  The shims can be removed if
libpthread is given a version bump.

Reviewed by:	davidxu
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a generic way to back threads out of wait queues when handling</title>
<updated>2004-12-18T18:07:37+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-12-18T18:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=843d4004b367db61428fa1cbf611cdbd2791d672'/>
<id>843d4004b367db61428fa1cbf611cdbd2791d672</id>
<content type='text'>
signals instead of having more intricate knowledge of thread state
within signal handling.

Simplify signal code because of above (by David Xu).

Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop().  This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.

When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.

Use private mutexes for libc and libpthread.  Signals are
deferred while threads hold private mutexes.  This fix also
breaks www/linuxpluginwrapper; a patch that fixes it is at
http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff

Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).

In collaboration with:	davidxu
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
signals instead of having more intricate knowledge of thread state
within signal handling.

Simplify signal code because of above (by David Xu).

Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop().  This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.

When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.

Use private mutexes for libc and libpthread.  Signals are
deferred while threads hold private mutexes.  This fix also
breaks www/linuxpluginwrapper; a patch that fixes it is at
http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff

Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).

In collaboration with:	davidxu
</pre>
</div>
</content>
</entry>
<entry>
<title>1. Move thread list flags into new separate member, and atomically</title>
<updated>2004-10-23T23:28:36+00:00</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-10-23T23:28:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b4f9f84b962fcd8c899067dbfa2976254213d9df'/>
<id>b4f9f84b962fcd8c899067dbfa2976254213d9df</id>
<content type='text'>
   put DEAD thread on GC list, this closes a race between pthread_join
   and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
   deallocation code in rtld seems no lock protection or it is broken,
   under stress testing, memory is corrupted.

Reviewed by: deischen
patch partly provided by: deischen
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
   put DEAD thread on GC list, this closes a race between pthread_join
   and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
   deallocation code in rtld seems no lock protection or it is broken,
   under stress testing, memory is corrupted.

Reviewed by: deischen
patch partly provided by: deischen
</pre>
</div>
</content>
</entry>
<entry>
<title>As long as we have a knob to force system scope threads, why not have</title>
<updated>2004-08-12T12:12:12+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-08-12T12:12:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b9de27c0051bd9c4ce167327b5824a31baee1474'/>
<id>b9de27c0051bd9c4ce167327b5824a31baee1474</id>
<content type='text'>
a knob to force process scope threads.  If the environment variable
LIBPTHREAD_PROCESS_SCOPE is set, force all threads to be process
scope threads regardless of how the application creates them.  If
LIBPTHREAD_SYSTEM_SCOPE is set (forcing system scope threads), it
overrides LIBPTHREAD_PROCESS_SCOPE.

        $ # To force system scope threads
        $ LIBPTHREAD_SYSTEM_SCOPE=anything threaded_app
        $ # To force process scope threads
        $ LIBPTHREAD_PROCESS_SCOPE=anything threaded_app
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a knob to force process scope threads.  If the environment variable
LIBPTHREAD_PROCESS_SCOPE is set, force all threads to be process
scope threads regardless of how the application creates them.  If
LIBPTHREAD_SYSTEM_SCOPE is set (forcing system scope threads), it
overrides LIBPTHREAD_PROCESS_SCOPE.

        $ # To force system scope threads
        $ LIBPTHREAD_SYSTEM_SCOPE=anything threaded_app
        $ # To force process scope threads
        $ LIBPTHREAD_PROCESS_SCOPE=anything threaded_app
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a way to force 1:1 mode for libpthread.  To do this, define</title>
<updated>2004-08-07T15:15:38+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-08-07T15:15:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=00be1d3d12712e135e623008af4c7038730e61a3'/>
<id>00be1d3d12712e135e623008af4c7038730e61a3</id>
<content type='text'>
LIBPTHREAD_SYSTEM_SCOPE in the environment.

You can still force libpthread to be built in strictly 1:1 by
adding -DSYSTEM_SCOPE_ONLY to CFLAGS.  This is kept for archs
that don't yet support M:N mode.

Requested by:   rwatson
Reviewed by:    davidxu
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LIBPTHREAD_SYSTEM_SCOPE in the environment.

You can still force libpthread to be built in strictly 1:1 by
adding -DSYSTEM_SCOPE_ONLY to CFLAGS.  This is kept for archs
that don't yet support M:N mode.

Requested by:   rwatson
Reviewed by:    davidxu
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused symbols.</title>
<updated>2004-07-13T22:53:56+00:00</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-07-13T22:53:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=63db3fb2157443464796d0c6f68cf2a28ec6f3d6'/>
<id>63db3fb2157443464796d0c6f68cf2a28ec6f3d6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check pending signals, if there is signal will be unblocked by</title>
<updated>2004-06-12T07:40:01+00:00</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-06-12T07:40:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5321c2a9b02e061e8f5afe4538634523e9e37927'/>
<id>5321c2a9b02e061e8f5afe4538634523e9e37927</id>
<content type='text'>
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.

Reviewed by: deischen
Tested by: Sean McNeil &lt;sean@mcneil.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.

Reviewed by: deischen
Tested by: Sean McNeil &lt;sean@mcneil.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
