<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc_r/uthread/uthread_cond.c, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</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>At initialization, override the pthread stub routines in libc</title>
<updated>2002-11-13T18:13:26+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2002-11-13T18:13:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f38fac1471e9194e6de360dabbb59821fd8e0c1b'/>
<id>f38fac1471e9194e6de360dabbb59821fd8e0c1b</id>
<content type='text'>
by filling in the jump table.

Convert uses of pthread routines within libc_r to use the internal
versions (_pthread_foo instead of pthread_foo).

Remove a couple of globals from application namespace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
by filling in the jump table.

Convert uses of pthread routines within libc_r to use the internal
versions (_pthread_foo instead of pthread_foo).

Remove a couple of globals from application namespace.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamp suspend and resume.  While I'm here add pthread_suspend_all_np()</title>
<updated>2002-05-24T04:32:28+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2002-05-24T04:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5eb8d1f0b06897d05898ed3ba684d8860f9bef97'/>
<id>5eb8d1f0b06897d05898ed3ba684d8860f9bef97</id>
<content type='text'>
and pthread_resume_all_np().  These suspend and resume all threads except
the current thread, respectively.  The existing functions pthread_single_np()
and pthread_multi_np(), which formerly had no effect, now exhibit the same
behaviour and pthread_suspend_all_np() and pthread_resume_all_np().  These
functions have been added mostly for the native java port.

Don't allow the uthread kernel pipe to use the same descriptors as
stdio.  Mostily submitted by Oswald Buddenhagen &lt;ossi@kde.org&gt;.

Correct some minor style nits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and pthread_resume_all_np().  These suspend and resume all threads except
the current thread, respectively.  The existing functions pthread_single_np()
and pthread_multi_np(), which formerly had no effect, now exhibit the same
behaviour and pthread_suspend_all_np() and pthread_resume_all_np().  These
functions have been added mostly for the native java port.

Don't allow the uthread kernel pipe to use the same descriptors as
stdio.  Mostily submitted by Oswald Buddenhagen &lt;ossi@kde.org&gt;.

Correct some minor style nits.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix logic errors in pthread_cond_wait() and pthread_cond_timedwait() that</title>
<updated>2001-08-19T20:05:42+00:00</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2001-08-19T20:05:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=204e56e381ccab3263a04aec2978bb960076c969'/>
<id>204e56e381ccab3263a04aec2978bb960076c969</id>
<content type='text'>
could cause deadlock after interruption due to a signal.

Reviewed by:	deischen
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
could cause deadlock after interruption due to a signal.

Reviewed by:	deischen
</pre>
</div>
</content>
</entry>
<entry>
<title>To be consistent, use the __weak_reference macro from &lt;sys/cdefs.h&gt;</title>
<updated>2001-04-10T04:19:21+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2001-04-10T04:19:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=437df4859af22264a2c620a3720c776bf0c4a58d'/>
<id>437df4859af22264a2c620a3720c776bf0c4a58d</id>
<content type='text'>
instead of #pragma weak to create weak definitions.

Suggested by:	bde
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of #pragma weak to create weak definitions.

Suggested by:	bde
</pre>
</div>
</content>
</entry>
<entry>
<title>Add weak definitions for wrapped system calls.  In general:</title>
<updated>2001-01-24T13:03:38+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2001-01-24T13:03:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e5106342c6de9cbe26c4827e4e29bae309cd8cfb'/>
<id>e5106342c6de9cbe26c4827e4e29bae309cd8cfb</id>
<content type='text'>
	_foo - wrapped system call
	foo - weak definition to _foo

and for cancellation points:

	_foo - wrapped system call
	__foo - enter cancellation point, call _foo(), leave
	        cancellation point
	foo - weak definition to __foo

Change use of global _thread_run to call a function to get the
currently running thread.

Make all pthread_foo functions weak definitions to _pthread_foo,
where _pthread_foo is the implementation.  This allows an application
to provide its own pthread functions.

Provide slightly different versions of pthread_mutex_lock and
pthread_mutex_init so that we can tell the difference between
a libc mutex and an application mutex.  Threads holding mutexes
internal to libc should never be allowed to exit, call signal
handlers, or cancel.

Approved by:	-arch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	_foo - wrapped system call
	foo - weak definition to _foo

and for cancellation points:

	_foo - wrapped system call
	__foo - enter cancellation point, call _foo(), leave
	        cancellation point
	foo - weak definition to __foo

Change use of global _thread_run to call a function to get the
currently running thread.

Make all pthread_foo functions weak definitions to _pthread_foo,
where _pthread_foo is the implementation.  This allows an application
to provide its own pthread functions.

Provide slightly different versions of pthread_mutex_lock and
pthread_mutex_init so that we can tell the difference between
a libc mutex and an application mutex.  Threads holding mutexes
internal to libc should never be allowed to exit, call signal
handlers, or cancel.

Approved by:	-arch
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug where a statically initialized condition variable</title>
<updated>2000-11-16T22:50:33+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2000-11-16T22:50:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f17033e38db1b99c6180c8cab664e36d6b3446c0'/>
<id>f17033e38db1b99c6180c8cab664e36d6b3446c0</id>
<content type='text'>
was not getting properly initialized in pthread_cond_signal()
and pthread_cond_broadcast().  Reportedly, this can cause
an application to die.

MFC candidate

Submitted by:	ade
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
was not getting properly initialized in pthread_cond_signal()
and pthread_cond_broadcast().  Reportedly, this can cause
an application to die.

MFC candidate

Submitted by:	ade
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't needlessly poll file descriptors when there are no</title>
<updated>2000-11-09T05:08:26+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2000-11-09T05:08:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b5a8a15c2f1a411fad0657422539ef5149287917'/>
<id>b5a8a15c2f1a411fad0657422539ef5149287917</id>
<content type='text'>
file descriptors needing to be polled (Doh!).  Reported
by Dan Nelson &lt;dnelson@emsphone.com&gt;.

Don't install and start the scheduling timer until the
first thread is created.  This prevents the overhead of
having a periodic scheduling signal in a single threaded
program.  Reported by Dan Nelson &lt;dnelson@emsphone.com&gt;.

Allow builtin longjmps out of application installed
signal handlers without the need perform any post-handler
cleanup:

  o Change signal handling to save the threads interrupted
    context on the stack.  The threads current context is
    now always stored in the same place (in the pthread).
    If and when a signal handler returns, the interrupted
    context is copied back to the storage area in the pthread.

  o Before calling invoking a signal handler for a thread,
    back the thread out of any internal waiting queues
    (mutex, CV, join, etc) to which it belongs.

Rework uthread_info.c a bit to make it easier to change
the format of a thread dump.

Use an alternal signal stack for the thread library's
signal handler.  This allows us to fiddle with the main
threads stack without fear of it being in use.

Reviewed by:	jasone
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
file descriptors needing to be polled (Doh!).  Reported
by Dan Nelson &lt;dnelson@emsphone.com&gt;.

Don't install and start the scheduling timer until the
first thread is created.  This prevents the overhead of
having a periodic scheduling signal in a single threaded
program.  Reported by Dan Nelson &lt;dnelson@emsphone.com&gt;.

Allow builtin longjmps out of application installed
signal handlers without the need perform any post-handler
cleanup:

  o Change signal handling to save the threads interrupted
    context on the stack.  The threads current context is
    now always stored in the same place (in the pthread).
    If and when a signal handler returns, the interrupted
    context is copied back to the storage area in the pthread.

  o Before calling invoking a signal handler for a thread,
    back the thread out of any internal waiting queues
    (mutex, CV, join, etc) to which it belongs.

Rework uthread_info.c a bit to make it easier to change
the format of a thread dump.

Use an alternal signal stack for the thread library's
signal handler.  This allows us to fiddle with the main
threads stack without fear of it being in use.

Reviewed by:	jasone
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement zero system call thread switching.  Performance of</title>
<updated>2000-10-13T22:12:32+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2000-10-13T22:12:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fbeb36e4bf72161883eda56a41578de1d8f2f885'/>
<id>fbeb36e4bf72161883eda56a41578de1d8f2f885</id>
<content type='text'>
thread switches should be on par with that under scheduler
activations.

  o Timing is achieved through the use of a fixed interval
    timer (ITIMER_PROF) to count scheduling ticks instead
    of retrieving the time-of-day upon every thread switch
    and calculating elapsed real time.

  o Polling for I/O readiness is performed once for each
    scheduling tick instead of every thread switch.

  o The non-signal saving/restoring versions of setjmp/longjmp
    are used to save and restore thread contexts.  This may
    allow the removal of _THREAD_SAFE macros from setjmp()
    and longjmp() - needs more investigation.

Change signal handling so that signals are handled in the
context of the thread that is receiving the signal.  When
signals are dispatched to a thread, a special signal handling
frame is created on top of the target threads stack.  The
frame contains the threads saved state information and a new
context in which the thread can run.  The applications signal
handler is invoked through a wrapper routine that knows how
to restore the threads saved state and unwind to previous
frames.

Fix interruption of threads due to signals.  Some states
were being improperly interrupted while other states were
not being interrupted.  This should fix several PRs.

Signal handlers, which are invoked as a result of a process
signal (not by pthread_kill()), are now called with the
code (or siginfo_t if SA_SIGINFO was set in sa_flags) and
sigcontext_t as received from the process signal handler.

Modify the search for a thread to which a signal is delivered.
The search algorithm is now:

  o First thread found in sigwait() with signal in wait mask.
  o First thread found sigsuspend()'d on the signal.
  o Current thread if signal is unmasked.
  o First thread found with signal unmasked.

Collapse machine dependent support into macros defined in
pthread_private.h.  These should probably eventually be moved
into separate MD files.

Change the range of settable priorities to be compliant with
POSIX (0-31).  The threads library uses higher priorities
internally for real-time threads (not yet implemented) and
threads executing signal handlers.  Real-time threads and
threads running signal handlers add 64 and 32, respectively,
to a threads base priority.

Some other small changes and cleanups.

PR:		17757 18559 21943
Reviewed by:	jasone
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
thread switches should be on par with that under scheduler
activations.

  o Timing is achieved through the use of a fixed interval
    timer (ITIMER_PROF) to count scheduling ticks instead
    of retrieving the time-of-day upon every thread switch
    and calculating elapsed real time.

  o Polling for I/O readiness is performed once for each
    scheduling tick instead of every thread switch.

  o The non-signal saving/restoring versions of setjmp/longjmp
    are used to save and restore thread contexts.  This may
    allow the removal of _THREAD_SAFE macros from setjmp()
    and longjmp() - needs more investigation.

Change signal handling so that signals are handled in the
context of the thread that is receiving the signal.  When
signals are dispatched to a thread, a special signal handling
frame is created on top of the target threads stack.  The
frame contains the threads saved state information and a new
context in which the thread can run.  The applications signal
handler is invoked through a wrapper routine that knows how
to restore the threads saved state and unwind to previous
frames.

Fix interruption of threads due to signals.  Some states
were being improperly interrupted while other states were
not being interrupted.  This should fix several PRs.

Signal handlers, which are invoked as a result of a process
signal (not by pthread_kill()), are now called with the
code (or siginfo_t if SA_SIGINFO was set in sa_flags) and
sigcontext_t as received from the process signal handler.

Modify the search for a thread to which a signal is delivered.
The search algorithm is now:

  o First thread found in sigwait() with signal in wait mask.
  o First thread found sigsuspend()'d on the signal.
  o Current thread if signal is unmasked.
  o First thread found with signal unmasked.

Collapse machine dependent support into macros defined in
pthread_private.h.  These should probably eventually be moved
into separate MD files.

Change the range of settable priorities to be compliant with
POSIX (0-31).  The threads library uses higher priorities
internally for real-time threads (not yet implemented) and
threads executing signal handlers.  Real-time threads and
threads running signal handlers add 64 and 32, respectively,
to a threads base priority.

Some other small changes and cleanups.

PR:		17757 18559 21943
Reviewed by:	jasone
</pre>
</div>
</content>
</entry>
</feed>
