<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libpthread/thread/thr_create.c, branch release/6.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F6.0.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F6.0.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2005-11-03T00:35:26Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2005-11-03T00:35:26Z</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2005-11-03T00:35:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3640cb54210edbb7edbf1b12ef0127ecfcea967d'/>
<id>urn:sha1:3640cb54210edbb7edbf1b12ef0127ecfcea967d</id>
<content type='text'>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</content>
</entry>
<entry>
<title>Use a generic way to back threads out of wait queues when handling</title>
<updated>2004-12-18T18:07:37Z</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-12-18T18:07:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=843d4004b367db61428fa1cbf611cdbd2791d672'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>1. Move thread list flags into new separate member, and atomically</title>
<updated>2004-10-23T23:28:36Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-10-23T23:28:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b4f9f84b962fcd8c899067dbfa2976254213d9df'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>As long as we have a knob to force system scope threads, why not have</title>
<updated>2004-08-12T12:12:12Z</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-08-12T12:12:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b9de27c0051bd9c4ce167327b5824a31baee1474'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>Add a way to force 1:1 mode for libpthread.  To do this, define</title>
<updated>2004-08-07T15:15:38Z</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-08-07T15:15:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=00be1d3d12712e135e623008af4c7038730e61a3'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>Remove unused symbols.</title>
<updated>2004-07-13T22:53:56Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-07-13T22:53:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=63db3fb2157443464796d0c6f68cf2a28ec6f3d6'/>
<id>urn:sha1:63db3fb2157443464796d0c6f68cf2a28ec6f3d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Check pending signals, if there is signal will be unblocked by</title>
<updated>2004-06-12T07:40:01Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2004-06-12T07:40:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5321c2a9b02e061e8f5afe4538634523e9e37927'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>Add a simple work-around for deadlocking on recursive read locks</title>
<updated>2004-01-08T15:37:09Z</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2004-01-08T15:37:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=24f33bca1c2f4207c48830f893ee5a07e3c4402e'/>
<id>urn:sha1:24f33bca1c2f4207c48830f893ee5a07e3c4402e</id>
<content type='text'>
on a rwlock while there are writers waiting.  We normally favor
writers but when a reader already has at least one other read lock,
we favor the reader.  We don't track all the rwlocks owned by a
thread, nor all the threads that own a rwlock -- we just keep
a count of all the read locks owned by a thread.

PR:	24641
</content>
</entry>
<entry>
<title>Implement sigaltstack() as per-threaded. Current only scope process thread</title>
<updated>2003-12-29T23:21:09Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2003-12-29T23:21:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=02eead1d0a61242b863cd813b59eca6e4d4b8a04'/>
<id>urn:sha1:02eead1d0a61242b863cd813b59eca6e4d4b8a04</id>
<content type='text'>
is supported, for scope system process, kernel signal bits need to be
changed.

Reviewed by: deischen
Tested on  : i386 amd64 ia64
</content>
</entry>
<entry>
<title>1. Allocating and freeing lock related resource in _thr_alloc and _thr_free</title>
<updated>2003-09-14T22:52:16Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2003-09-14T22:52:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a3a398b57d784dda3c602b1018d11a6bda383bb4'/>
<id>urn:sha1:a3a398b57d784dda3c602b1018d11a6bda383bb4</id>
<content type='text'>
   to avoid potential memory leak, also fix a bug in pthread_create, contention
   scope should be inherited when PTHREAD_INHERIT_SCHED is set, and also check
   right field for PTHREAD_INHERIT_SCHED, scheduling inherit flag is in sched_inherit.
2. Execute hooks registered by atexit() on thread stack but not on scheduler
   stack.
3. Simplify some code in _kse_single_thread by calling xxx_destroy functions.

Reviewed by: deischen
</content>
</entry>
</feed>
