The NetBSD Project

CVS log for src/lib/libpthread/pthread_cond.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libpthread

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.77 / (download) - annotate - [select for diffs], Sat Feb 12 14:59:32 2022 UTC (11 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.76: +5 -2 lines
Diff to previous 1.76 (colored)

libpthread: Move namespacing include to top of .c files.

Stuff like libc's namespace.h, or atomic_op_namespace.h, which does
namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint',
has to go at the top of each .c file.  If it goes in the middle, it
might be too late to affect the declarations, and result in compile
errors.

I tripped over this by including <sys/atomic.h> in mips
<machine/lock.h>.

(Maybe we should create a new pthread_namespace.h file for the
purpose, but this'll do for now.)

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jun 14 21:33:28 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.75: +63 -32 lines
Diff to previous 1.75 (colored)

Another bug.  The CAS loop in pthread_cond_signal() could race against the
thread it is trying to awake.  The thread could exit the condvar and then
reinsert itself at the head of the list with a new waiter behind it.  It's
likely possible to fix this in a way that's wait-free but for now just fix
the bug.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Jun 13 17:39:42 2020 UTC (2 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Nix trailing whitespace.

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jun 10 22:45:15 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.73: +51 -69 lines
Diff to previous 1.73 (colored)

- Make pthread_condvar and pthread_mutex work on the stack rather than in
  pthread_t, so there's less chance of bad things happening if someone calls
  (for example) pthread_cond_broadcast() from a signal handler.

- Remove all the deferred waiter handling except for the one case that really
  matters which is transferring waiters from condvar -> mutex on wakeup, and
  do that by splicing the condvar's waiters onto the mutex.

- Remove the mutex waiters bit as it's another complication that's not
  strictly needed.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jun 6 22:23:59 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.72: +7 -7 lines
Diff to previous 1.72 (colored)

Adjust previous.  In the condvar case the wakeup might already have been
eaten.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Jun 4 04:40:01 2020 UTC (2 years, 7 months ago) by riastradh
Branch: MAIN
Changes since 1.71: +4 -4 lines
Diff to previous 1.71 (colored)

Nix trailing whitespace.  NFCI.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jun 3 22:10:24 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.70: +34 -15 lines
Diff to previous 1.70 (colored)

Deal with a couple of problems with threads being awoken early due to
timeouts or cancellation where:

- The restarting thread calls _lwp_exit() before another thread gets around
  to waking it with _lwp_unpark(), leading to ESRCH (observed by joerg@).
  (I may have removed a similar check mistakenly over the weekend.)

- The restarting thread considers itself gone off the sleep queue but
  at the same time another thread is part way through waking it, and hasn't
  fully completed that operation yet by setting thread->pt_mutexwait = 0.
  I think that could have potentially lead to the list of waiters getting
  messed up given the right circumstances.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jun 1 11:44:59 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.69: +97 -140 lines
Diff to previous 1.69 (colored)

In the interests of reliability simplify waiter handling more and redo
condvars to manage the list of waiters with atomic ops.

Revision 1.69 / (download) - annotate - [select for diffs], Sat May 16 22:53:37 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.68: +7 -17 lines
Diff to previous 1.68 (colored)

- Try to eliminate a hang in "parked" I've been seeing while stress testing.
  Centralise wakeup of deferred waiters in pthread__clear_waiters() and use
  throughout libpthread.  Make fewer assumptions.  Be more conservative in
  pthread_mutex when dealing with pending waiters.

- Remove the "hint" argument everywhere since the kernel doesn't use it any
  more.

Revision 1.65.4.2 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:00 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.65.4.1: +0 -44 lines
Diff to previous 1.65.4.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

Sync with HEAD

Revision 1.68 / (download) - annotate - [select for diffs], Tue Apr 14 23:35:07 2020 UTC (2 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: phil-wifi-20200421
Changes since 1.67: +2 -46 lines
Diff to previous 1.67 (colored)

Drop most of the logic associated with pthread__started.

The pthread_cond logic is a questionable optimisation at best and the
post-fork logic is plainly broken.

Revision 1.65.4.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:15 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.65: +26 -11 lines
Diff to previous 1.65 (colored)

Merge changes from current as of 20200406

Revision 1.67 / (download) - annotate - [select for diffs], Wed Jan 29 15:07:46 2020 UTC (3 years ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.66: +26 -8 lines
Diff to previous 1.66 (colored)

Use pthread_condattr_t and pthread_cond_t magic fields

Validate _PT_CONDATTR_MAGIC and _PT_COND_MAGIC respectively.

Revision 1.65.6.1 / (download) - annotate - [select for diffs], Sun Jan 26 10:55:16 2020 UTC (3 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.65: +2 -5 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Pull up following revision(s) (requested by ad in ticket #647):

	lib/libpthread/pthread_rwlock.c: revision 1.37 (patch)
	lib/libpthread/pthread_misc.c: revision 1.16
	lib/libpthread/pthread.c: revision 1.154
	lib/libpthread/pthread_int.h: revision 1.98
	lib/libpthread/pthread_cond.c: revision 1.66
	lib/libpthread/pthread_mutex.c: revision 1.66

Rip out some very ambitious optimisations around pthread_mutex that are
don't buy much.  This stuff is hard enough to get right in the kernel let
alone userspace, and I don't trust that it's right.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jan 13 18:22:56 2020 UTC (3 years ago) by ad
Branch: MAIN
Changes since 1.65: +2 -5 lines
Diff to previous 1.65 (colored)

Rip out some very ambitious optimisations around pthread_mutex that are
don't buy much.  This stuff is hard enough to get right in the kernel let
alone userspace, and I don't trust that it's right.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Dec 8 03:08:19 2017 UTC (5 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-0-RC1
Branch point for: phil-wifi, netbsd-9
Changes since 1.64: +5 -4 lines
Diff to previous 1.64 (colored)

unconst the timestamp

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jul 3 14:24:58 2016 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.63: +36 -2 lines
Diff to previous 1.63 (colored)

GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).

Revision 1.57.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:20 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.57.2.2: +7 -24 lines
Diff to previous 1.57.2.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.56.6.3 / (download) - annotate - [select for diffs], Thu May 22 11:36:59 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.56.6.2: +33 -15 lines
Diff to previous 1.56.6.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Thu Feb 20 13:53:26 2014 UTC (8 years, 11 months ago) by sborrill
Branch: netbsd-5
Changes since 1.53: +8 -6 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

Pull up the following revisions(s) (requested by prlw1 in ticket #1898):
	lib/libpthread/pthread_cond.c:	revision 1.62
	lib/libpthread/pthread_mutex.c:	revision 1.57,1.59

Partial fix for thread deadlock commonly observed with named.
Also address PR/44756.

Revision 1.56.8.4 / (download) - annotate - [select for diffs], Thu Feb 20 13:00:40 2014 UTC (8 years, 11 months ago) by sborrill
Branch: netbsd-6
Changes since 1.56.8.3: +8 -6 lines
Diff to previous 1.56.8.3 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

Pull up the following revisions(s) (requested by prlw1 in ticket #1029):
	lib/libpthread/pthread_cond.c:	revision 1.62
	lib/libpthread/pthread_mutex.c:	revision 1.57,1.59

Partial fix for thread deadlock commonly observed with named.
Also address PR/44756.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jan 31 20:44:01 2014 UTC (8 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.62: +5 -24 lines
Diff to previous 1.62 (colored)

remove compatibility code for handling CLOCK_MONOTONIC and handle it in the
syscall directly.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jan 31 19:22:00 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.61: +8 -6 lines
Diff to previous 1.61 (colored)

PR/44756: Sad Clouds: Prevent leakage of errno = ESRCH from _lwp_park. This
has two parts:
	- in pthread_cond_timedwait() if the thread we are trying to unpark
	  exited, retry the the _lwp_park call without it.
	- pthread_mutex() was affecting errno since it is calling _lwp_park()
	  from pthread_mutex_lock_slow(). preserve the original errno.
Note that the example problem still causes an occassional deadlock on machines
with many CPUs and it is the same deadlock we observe with named.

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:21:08 2013 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.57.2.1: +40 -5 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored)

resync from head

Revision 1.56.8.3 / (download) - annotate - [select for diffs], Mon Apr 29 01:50:18 2013 UTC (9 years, 9 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.56.8.2: +14 -2 lines
Diff to previous 1.56.8.2 (colored) to branchpoint 1.56 (colored)

Pull up following revision(s) (requested by manu in ticket #869):
	lib/libpthread/pthread_rwlock.c: revision 1.33
	lib/libc/include/reentrant.h: revision 1.16
	lib/libpthread/pthread_cond.c: revision 1.59
	lib/libpthread/pthread_misc.c: revision 1.15
	lib/libc/thread-stub/thread-stub.c: revision 1.23
	lib/libpthread/pthread_cancelstub.c: revision 1.38
	lib/libpthread/pthread_specific.c: revision 1.26
	lib/libpthread/pthread_mutex.c: revision 1.56
	lib/libpthread/pthread_tsd.c: revision 1.11
	lib/libpthread/Makefile: revision 1.80
	lib/libpthread/pthread.c: revision 1.143
	lib/libpthread/pthread_int.h: revision 1.89
- Allow libpthread to be dlopened again, by providing libc stubs to
libpthread.
- Fail if the dlopened libpthread does pthread_create(). From manu@
- Discussed at length in the mailing lists; approved by core@
- This was chosen as the least intrusive patch that will provide
  the necessary functionality.
XXX: pullup to 6

Revision 1.56.8.2 / (download) - annotate - [select for diffs], Sat Apr 20 15:14:07 2013 UTC (9 years, 9 months ago) by bouyer
Branch: netbsd-6
Changes since 1.56.8.1: +24 -4 lines
Diff to previous 1.56.8.1 (colored) to branchpoint 1.56 (colored)

Pull up following revision(s) (requested by christos in ticket #862):
	lib/libpthread/pthread_cond.c: revision 1.60
	lib/libpthread/pthread_cond.c: revision 1.61
PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait
after call pthread_condattr_setclock(CLOCK_MONOTONIC)
_lwp_park(2) expects a realtime clock, and it gets passed a monotonic
one.  Since monotonic < real, it never sleeps. This patch adjusts
the monotonic clock to be a real one before it passes is to
_lwp_park(2). This is the minimal hacky fix and it will be fixed
properly in _lwp_park(2) in the future.
XXX: pullup to 6.
for safety, declare mono on the outermost block it is used.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Apr 1 13:28:21 2013 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.60: +4 -3 lines
Diff to previous 1.60 (colored)

for safety, declare mono on the outermost block it is used.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 28 18:07:12 2013 UTC (9 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.59: +23 -4 lines
Diff to previous 1.59 (colored)

PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait
after call pthread_condattr_setclock(CLOCK_MONOTONIC)

_lwp_park(2) expects a realtime clock, and it gets passed a monotonic
one.  Since monotonic < real, it never sleeps. This patch adjusts
the monotonic clock to be a real one before it passes is to
_lwp_park(2). This is the minimal hacky fix and it will be fixed
properly in _lwp_park(2) in the future.

XXX: pullup to 6.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Mar 21 16:49:12 2013 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.58: +18 -3 lines
Diff to previous 1.58 (colored)

- Allow libpthread to be dlopened again, by providing libc stubs to libpthread.
- Fail if the dlopened libpthread does pthread_create(). From manu@
- Discussed at length in the mailing lists; approved by core@
- This was chosen as the least intrusive patch that will provide
  the necessary functionality.
XXX: pullup to 6

Revision 1.56.6.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:32:26 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.56.6.1: +37 -6 lines
Diff to previous 1.56.6.1 (colored) to branchpoint 1.56 (colored)

sync with (a bit old) head

Revision 1.56.8.1 / (download) - annotate - [select for diffs], Wed Nov 28 23:47:37 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1
Changes since 1.56: +37 -6 lines
Diff to previous 1.56 (colored)

Pull up following revision(s) (requested by christos in ticket #722):
	lib/libpthread/pthread_cond.c: revision 1.58
	lib/libpthread/pthread_condattr.3: revision 1.8
	lib/libpthread/pthread.h: revision 1.35
add pthread_condattr_setclock(3)

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:00:44 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.57: +37 -6 lines
Diff to previous 1.57 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.58 / (download) - annotate - [select for diffs], Sat Nov 3 03:10:50 2012 UTC (10 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7
Changes since 1.57: +37 -6 lines
Diff to previous 1.57 (colored)

add pthread_condattr_setclock(3)

Revision 1.56.6.1 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:15 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

sync with head

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 15 19:20:44 2012 UTC (10 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Do not mark pthread_cond_timedwait explicitly as inlineable, since it
calls pthread__self, which is static.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Nov 2 20:49:47 2010 UTC (12 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, netbsd-6
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Spell immediately correctly.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Mar 23 20:35:44 2010 UTC (12 years, 10 months ago) by drochner
Branch: MAIN
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

catch up with the __RENAME of nanosleep(2) a while ago, otherwise we
get the compatibility function which assumes a different struct timespec

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jan 18 12:14:17 2009 UTC (14 years ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

fix -Wsign-compare issues

Revision 1.53.4.2 / (download) - annotate - [select for diffs], Sat Oct 25 14:14:12 2008 UTC (14 years, 3 months ago) by yamt
Branch: christos-time_t
Changes since 1.53.4.1: +369 -0 lines
Diff to previous 1.53.4.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored)

remove ; after __weak_alias()

Revision 1.53.4.1, Sat Oct 25 14:14:11 2008 UTC (14 years, 3 months ago) by yamt
Branch: christos-time_t
Changes since 1.53: +0 -369 lines
FILE REMOVED

file pthread_cond.c was added on branch christos-time_t on 2008-10-25 14:14:12 +0000

Revision 1.53 / (download) - annotate - [select for diffs], Sat Oct 25 14:14:11 2008 UTC (14 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, christos-time_t-nbase, christos-time_t-base
Branch point for: netbsd-5, christos-time_t
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

remove ; after __weak_alias()

Revision 1.42.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:39:24 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.42.2.1: +36 -13 lines
Diff to previous 1.42.2.1 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.18.10.1 / (download) - annotate - [select for diffs], Tue Sep 16 18:49:32 2008 UTC (14 years, 4 months ago) by bouyer
Branch: netbsd-4
Changes since 1.18: +34 -4 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with the following revisions (requested by skrll in ticket #1196):
	gnu/dist/gdb						removed
	gnu/usr.bin/gdb53					removed
	distrib/cats/instkernel/Makefile			1.14.6.1
	gnu/dist/gdb6/bfd/config.bfd				1.3.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.c				1.1.1.2.6.1
	gnu/dist/gdb6/bfd/elfxx-sparc.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/Makefile.in				1.2.2.1.2.2
	gnu/dist/gdb6/gdb/alpha-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alpha-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/alphabsd-nat.h			1.1.2.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphabsd-tdep.h			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/alphanbsd-nat.c			1.1.2.1
	gnu/dist/gdb6/gdb/alphanbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64bsd-nat.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/amd64nbsd-nat.c			1.1.1.2.6.3
	gnu/dist/gdb6/gdb/amd64nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/arm-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/armbsd-tdep.c				1.1.2.1
	gnu/dist/gdb6/gdb/armnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/armnbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/configure.ac				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386bsd-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/i386nbsd-tdep.c			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/m68kbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/mipsnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/nbsd-thread.c				1.1.2.3
	gnu/dist/gdb6/gdb/ppcnbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/ppcnbsd-tdep.c			1.3.6.1
	gnu/dist/gdb6/gdb/sh-tdep.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/shnbsd-nat.c				1.1.1.2.6.3
	gnu/dist/gdb6/gdb/shnbsd-tdep.c				1.1.1.2.6.4
	gnu/dist/gdb6/gdb/shnbsd-tdep.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc-nat.c				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/sparc64nbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/sparcnbsd-nat.c			1.1.1.2.6.2
	gnu/dist/gdb6/gdb/tramp-frame.h				1.1.1.2.6.1
	gnu/dist/gdb6/gdb/vaxbsd-nat.c				1.1.1.2.6.2
	gnu/dist/gdb6/gdb/config/alpha/nbsd.mh			1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsd.mt			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/arm/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/i386/nbsd64.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/m68k/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/mips/nbsd.mh			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/powerpc/nbsd.mh		1.1.1.2.6.1
	gnu/dist/gdb6/gdb/config/sh/nbsd.mh			1.1.1.1.6.2
	gnu/dist/gdb6/gdb/config/sh/tm-nbsd.h			1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsd64.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/sparc/nbsdelf.mh		1.1.1.1.6.1
	gnu/dist/gdb6/gdb/config/vax/nbsdelf.mh			1.1.1.1.6.1
	gnu/dist/gdb6/opcodes/configure				1.1.1.2.6.1
	gnu/dist/gdb6/opcodes/configure.in			1.1.1.2.6.1
	gnu/usr.bin/Makefile					1.126.4.1
	gnu/usr.bin/gdb6/arch/alpha/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/alpha/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/init.c			1.2.6.1
	gnu/usr.bin/gdb6/arch/alpha/nm.h			1.2.6.1
	gnu/usr.bin/gdb6/arch/arm/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/arm/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/armeb/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/defs.mk			1.1.6.3
	gnu/usr.bin/gdb6/arch/armeb/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/armeb/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/i386/defs.mk			1.4.4.1
	gnu/usr.bin/gdb6/arch/i386/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/m68000/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/tm.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68000/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/m68k/defs.mk			1.1.4.1
	gnu/usr.bin/gdb6/arch/m68k/init.c			1.1.4.1
	gnu/usr.bin/gdb6/arch/mipseb/config.h			1.3.4.1
	gnu/usr.bin/gdb6/arch/mipseb/defs.mk			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipseb/init.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/config.h			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/defs.mk			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/init.c			1.2.6.3
	gnu/usr.bin/gdb6/arch/mipsel/tm.h			1.2.6.2
	gnu/usr.bin/gdb6/arch/mipsel/version.c			1.2.6.2
	gnu/usr.bin/gdb6/arch/powerpc/defs.mk			1.3.6.1
	gnu/usr.bin/gdb6/arch/powerpc/init.c			1.3.6.1
	gnu/usr.bin/gdb6/arch/sh3eb/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3eb/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3eb/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3eb/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/config.h			1.2.2.2
	gnu/usr.bin/gdb6/arch/sh3el/defs.mk			1.2.8.3
	gnu/usr.bin/gdb6/arch/sh3el/init.c			1.1.8.3
	gnu/usr.bin/gdb6/arch/sh3el/nm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/tm.h			1.1.8.2
	gnu/usr.bin/gdb6/arch/sh3el/version.c			1.1.8.2
	gnu/usr.bin/gdb6/arch/sparc/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/sparc64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/sparc64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/init.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/tm.h				1.1.6.2
	gnu/usr.bin/gdb6/arch/vax/version.c			1.1.6.2
	gnu/usr.bin/gdb6/arch/x86_64/defs.mk			1.2.6.1
	gnu/usr.bin/gdb6/arch/x86_64/init.c			1.1.6.1
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/armeb/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/bfdver.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3eb/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfd.h			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/sh3el/bfdver.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/bfd/arch/sh3el/defs.mk			1.1.8.3
	gnu/usr.bin/gdb6/bfd/arch/vax/bfd.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/bfdver.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/config.h			1.1.6.2
	gnu/usr.bin/gdb6/bfd/arch/vax/defs.mk			1.1.6.2
	gnu/usr.bin/gdb6/gdb/Makefile				1.5.2.1.2.2
	gnu/usr.bin/gdb6/gdbtui/Makefile			1.2.6.1
	gnu/usr.bin/gdb6/libiberty/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/libiberty/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3eb/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/opcodes/arch/sh3el/defs.mk		1.1.8.3
	gnu/usr.bin/gdb6/opcodes/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/opcodes/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/armeb/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/m68000/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/mipsel/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3eb/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/config.h		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/sh3el/defs.mk		1.1.8.2
	gnu/usr.bin/gdb6/readline/arch/vax/config.h		1.1.6.2
	gnu/usr.bin/gdb6/readline/arch/vax/defs.mk		1.1.6.2
	gnu/usr.bin/gdb6/sim/arch/mipseb/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipseb/defs.mk		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/cconfig.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/config.h		1.1.2.1
	gnu/usr.bin/gdb6/sim/arch/mipsel/defs.mk		1.1.2.1
	lib/libkvm/kvm_sparc64.c				1.10.18.2
	lib/libpthread/pthread.c				1.48.6.4
	lib/libpthread/pthread_barrier.c			1.6.18.1
	lib/libpthread/pthread_cond.c				1.18.12.2
	lib/libpthread/pthread_debug.h				1.8.18.1
	lib/libpthread/pthread_int.h				1.34.4.5
	lib/libpthread/pthread_lock.c				1.14.6.1
	lib/libpthread/pthread_mutex.c				1.22.4.2
	lib/libpthread/pthread_run.c				1.18.12.4
	lib/libpthread/pthread_rwlock.c				1.13.6.2
	lib/libpthread/pthread_sa.c				1.37.6.5
	lib/libpthread/pthread_sig.c				1.47.4.8
	lib/libpthread/pthread_sleep.c				1.7.6.2
	lib/libpthread/sem.c					1.9.6.2
	lib/libpthread/arch/sh3/pthread_md.h			1.3.6.1
	regress/lib/libpthread/resolv/Makefile			1.1.12.1
	regress/lib/libpthread/sigrunning/Makefile		1.1.2.1
	regress/lib/libpthread/sigrunning/sigrunning.c		1.1.2.1
	share/mk/bsd.own.mk					1.489.4.3
	sys/arch/amd64/amd64/locore.S				1.18.14.1
	sys/arch/amd64/amd64/machdep.c				1.44.2.3.2.1
	sys/arch/amd64/conf/kern.ldscript			1.1.70.1
	sys/arch/cats/conf/Makefile.cats.inc			1.17.30.1
	sys/arch/shark/conf/Makefile.shark.inc			1.6.30.1
	sys/arch/sparc64/conf/kern.ldscript			1.7.26.2
	sys/arch/sparc64/conf/kern32.ldscript			1.6.26.2
	sys/arch/sparc64/include/kcore.h			1.4.92.2
	sys/arch/sparc64/sparc64/locore.s			1.232.4.4
	sys/arch/sparc64/sparc64/machdep.c			1.193.4.3
	sys/arch/sparc64/sparc64/pmap.c				1.184.2.1.2.4
	sys/conf/newvers.sh					1.42.26.2
	sys/kern/kern_sa.c					1.87.4.11
	sys/kern/kern_synch.c					1.173.4.2
	sys/sys/savar.h						1.20.10.2
	tools/gdb/Makefile					1.9.4.1
	tools/gdb/mknative-gdb					1.1.6.1

pullup the wrstuden-fixsa CVS branch to netbsd-4:
toolchain/35540 - GDB 6 support for pthreads.
port-sparc64/37534 - ktrace firefox gives
    kernel trap 30: data access expection
GDB changes:
- delete gdb53
- enable gdb6 on all architectures
- add support for amd64 crash dumps
- add support for sparc64 crash dumps
- add support for /proc pid to executable filename for all archs
- enable thread support for all architectures
- add a note section to kernels to all platforms
- support detection/unwinding of signals for most architectures.
- Fix PTHREAD_UCONTEXT_TO_REG / PTHREAD_REG_TO_UCONTEXT on sh3.
- Apply fix from binutils-current so that sparc gdb can be cross built
  on a 64bit host.
SA/pthread changes:
Pre-allocate memory needed for event delivery. Eliminates dropped
interrupts under load.
Deliver intra-process signals to running threads
Eliminate some deadlock scenarios
Fix intra-process signal delivery when delivering to a thread waiting
for signals. Makes afs work again!

Revision 1.52 / (download) - annotate - [select for diffs], Sat Aug 2 16:02:26 2008 UTC (14 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, matt-mips64-base2
Changes since 1.51: +4 -3 lines
Diff to previous 1.51 (colored)

Change some type to eliminate some lint warnings.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jul 18 16:17:11 2008 UTC (14 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.50: +13 -2 lines
Diff to previous 1.50 (colored)

add pthread_cond_has_waiters_np()

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 28 10:37:20 2008 UTC (14 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.49: +3 -2 lines
Diff to previous 1.49 (colored)

Avoid spurious assertion failure.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 23 11:01:19 2008 UTC (14 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.48: +22 -12 lines
Diff to previous 1.48 (colored)

Split cond_signal/cond_broadcast into inline and non-inline parts, like
the kernel.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:29:54 2008 UTC (14 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.42: +128 -217 lines
Diff to previous 1.42 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 21 11:27:41 2008 UTC (14 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.47: +13 -5 lines
Diff to previous 1.47 (colored)

PR lib/38948: libpthread, java: thread awakening itself

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:04:34 2008 UTC (14 years, 7 months ago) by yamt
Branch: yamt-pf42
Changes since 1.41.4.1: +123 -220 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

sync with head

Revision 1.47 / (download) - annotate - [select for diffs], Mon May 26 02:06:21 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3
Changes since 1.46: +18 -2 lines
Diff to previous 1.46 (colored)

Add a comment describing some limitiations of this implementation.

Revision 1.46 / (download) - annotate - [select for diffs], Mon May 26 00:16:35 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.45: +15 -9 lines
Diff to previous 1.45 (colored)

- Eliminate one test+branch.
- Fix a comment.
- Fix a lock leak.

Revision 1.45 / (download) - annotate - [select for diffs], Sun May 25 23:51:31 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.44: +6 -4 lines
Diff to previous 1.44 (colored)

pthread_cond_timedwait: don't leak EINTR or EALREADY to the caller.

Revision 1.44 / (download) - annotate - [select for diffs], Sun May 25 17:11:13 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.43: +4 -2 lines
Diff to previous 1.43 (colored)

Fix error in previous.

Revision 1.43 / (download) - annotate - [select for diffs], Sun May 25 17:05:28 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.42: +98 -221 lines
Diff to previous 1.42 (colored)

PR lib/38741 priority inversion in libpthread breaks apps that use
SCHED_FIFO threads

- Change condvar sync so that we never take the condvar's spinlock without
  first holding the caller-provided mutex. Previously, the spinlock was only
  taken without the mutex in an error path, but it was enough to trigger the
  problem described in the PR.

- Even with this change, applications calling pthread_cond_signal/broadcast
  without holding the interlocking mutex are still subject to the problem
  described in the PR. POSIX discourages this saying that it leads to
  undefined scheduling behaviour, which seems good enough for the time being.

- Elsewhere, use a hash of mutexes instead of per-object spinlocks to
  synchronize entry/exit from sleep queues.

- Simplify how sleep queues are maintained.

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:39 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.41: +2 -9 lines
Diff to previous 1.41 (colored)

sync with head.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:01 2008 UTC (14 years, 9 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.41: +2 -9 lines
Diff to previous 1.41 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 00:40:28 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.34.2.2: +4 -4 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

sync with HEAD

Revision 1.41 / (download) - annotate - [select for diffs], Thu Feb 14 21:40:51 2008 UTC (14 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: yamt-pf42
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

Adjust mutex/rwlock definitions to match reality now that there is only
one implementation of each. PR lib/38030.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:36:34 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.34.2.1: +19 -29 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Mon Dec 24 16:04:21 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.39: +6 -6 lines
Diff to previous 1.39 (colored)

- Use pthread__cancelled() in more places.
- pthread_join(): assert that pthread_cond_wait() returns zero.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Nov 19 15:14:12 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: cube-autoconf-base, cube-autoconf
Changes since 1.38: +2 -12 lines
Diff to previous 1.38 (colored)

Remove the debuglog stuff. ktrace is more useful now.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 13 15:57:11 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.37: +15 -15 lines
Diff to previous 1.37 (colored)

For PR bin/37347:

- Override __libc_thr_init() instead of using our own constructor.
- Add pthread__getenv() and use instead of getenv(). This is used before
  we are up and running and unfortunatley getenv() takes locks.

Other changes:

- Cache the spinlock vectors in pthread__st. Internal spinlock operations
  now take 1 function call instead of 3 (i386).
- Use pthread__self() internally, not pthread_self().
- Use __attribute__ ((visibility("hidden"))) in some places.
- Kill PTHREAD_MAIN_DEBUG.

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:11:40 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.34: +44 -34 lines
Diff to previous 1.34 (colored)

sync with HEAD

Revision 1.18.12.2 / (download) - annotate - [select for diffs], Sun Nov 4 04:26:57 2007 UTC (15 years, 2 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.18.12.1: +4 -4 lines
Diff to previous 1.18.12.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Check in changes to locking behavior.

pthread__sched() now takes a parameter indicating if the run queue is
already locked. Useful in cases where we already hold pthread__runqueue_lock.

pthread__suspend() now requires callers explicitly lock pthread__runqueue_lock
so we avoid issues with locking order regarding pt_statelock.

Adjsut our lock hierarchy. pthread__runqueue_lock is now above
pt_statelock, triggering the above adjustments. Adjust a lot of routines
as a result. Also move pt_siglock way up in the hierarchy, making
pthread__kill() not violate locking. Add a few extra locks to the list.

Adjust a botch in how pthread_join() used pthread-spintrylock().

pthread_cancel() now correctly walks up the locks with thread->pt_sleeplock.
We can't just lock it, as it points to a lock in the top locking rung. So
try locking, and if it fails, unlock and re-lock. Add code to cope with
the target thread not being in the expected state (which was on a
blocked queue) after we get all the locks.

Add comments to describe what's going on in places that I got confused.

Now that pt_statelock is lower in the locking order than
pthread__runqueue_lock, we can explicitly lock a thread's state before
we take it off the run queue. Adjust sched_yield() accordingly and
add some locking calls that were commented out before (as they'd have
been locking violations).

pthread_next(): now that we can lock the state lock while holding the run
queue lock, do so. Set a thread's state to PT_STATE_RUNNING before we
pull it off the run queue. Since we always are going to switch to it,
set pt_vpid and pt_lastlwp while setting the state. pthread_next
callers now _don't_ set these values.

pthread__kill(): grab pthread__runqueue_lock before target->pt_statelock.
If we want to target a thread that is on a blocked queue, do the
pthread_spintrylock() dance. Unlock all three locks we're running around
with, lock target->pt_sleeplock, then re-lock them all. After we lock,
make sure that the thread's still on a blocked queue before proceeding. If
it's not, either exit (if we wanted to wake out of sigtimedwait())
or start it all over. If the thread has gone live, it may have blocked
our signal and it'd be quite weird to get a signal you'd disabled, just
because the signaller had been running before you blocked it.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Sep 13 23:51:47 2007 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

Add a per-mutex deferred wakeup flag so that threads doing something like
the following do not wake other threads early:

	pthread_mutex_lock(&mutex);
	pthread_cond_broadcast(&cond);
	foo = malloc(100);		/* takes libc mutexes */
	pthread_mutex_unlock(&mutex);

Revision 1.31.2.5 / (download) - annotate - [select for diffs], Mon Sep 10 11:09:00 2007 UTC (15 years, 4 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.31.2.4: +3 -4 lines
Diff to previous 1.31.2.4 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

Reduce diff to HEAD.

Revision 1.31.2.4 / (download) - annotate - [select for diffs], Mon Sep 10 10:54:05 2007 UTC (15 years, 4 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.31.2.3: +43 -33 lines
Diff to previous 1.31.2.3 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Revision 1.18.12.1 / (download) - annotate - [select for diffs], Mon Sep 10 05:24:53 2007 UTC (15 years, 4 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.18: +32 -2 lines
Diff to previous 1.18 (colored)

Check in first step towards having pthread_kill() kill a thread running
on another CPU.

This change adds initial support for deferred signal handling. Just before
we go to sleep and while we hold &self->pt_statelock, check to see if we
have any deferred signals (blocked signals) pending. These are signals
that are not masked in our mask and which have been sent to us. We
were running when they came in. Further, since they are being handled
this way, there's a signal handler defined for them.

So unlock, run the signal handler(s), then carry on.

For condition variables, we consider this a spurious wakeup, so we just
return 0, having not unlocked the mutex. We run the handler with
the mutex held. This shouldn't matter, as you aren't supposed to play
with mutexes in signal handlers. :-)

For nanosleep(), we just process signals, then go to sleep.

For all other cases, we are in a loop with some external predicate. So
we process the signal then roll around the loop to see if it still applies.

In sched_yield(), spin until all deferred signals are gone. Since we hold
self->pt_statelock and that lock has to be held before sending a deferred
signal, no new deferred signals will come in until we're asleep.

While here, be more careful about locking while changing pt_state
to PT_STATE_RUNNING. Grab pt_statelock while doing it, and also set
next->pt_vpid to self->pt_vpid holding the same lock. Will make
the test to determine how to deliver a signal work right (since
a thread's vpid will soon matter in the general case). No longer
set next->pt_vpid in pthread__next().

Revision 1.36 / (download) - annotate - [select for diffs], Sat Sep 8 22:49:50 2007 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.35: +12 -8 lines
Diff to previous 1.35 (colored)

- Get rid of self->pt_mutexhint and use pthread__mutex_owned() instead.
- Update some comments and fix minor bugs. Minor cosmetic changes.
- Replace some spinlocks with mutexes and rwlocks.
- Change the process private semaphores to use mutexes and condition
  variables instead of doing the synchronization directly. Spinlocks
  are no longer used by the semaphore code.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Sep 7 14:09:27 2007 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.34: +35 -29 lines
Diff to previous 1.34 (colored)

- Don't take the mutex's spinlock (ptr_interlock) in pthread_cond_wait().
  Instead, make the deferred wakeup list a per-thread array and pass down
  the lwpid_t's that way.

- In pthread_cond_wait(), take the mutex before dealing with early wakeup.
  In this way there should never be contention on the CV's spinlock if
  the app follows POSIX rules (there should only be contention on the
  user-provided mutex).

- Add a port of the kernel's rwlocks. The rwlock's spinlock is only taken if
  there is contention. This is enabled where atomic ops are available. Right
  now that is only i386 and amd64 because I don't have other hardware to
  test with. It's trivial to add stubs for other architectures as long as
  they have compare-and-swap. When we have proper atomic ops the old rwlock
  code can be removed.

- Add a new mutex implementation that's similar to the kernel's mutexes, but
  uses compare-and-swap to maintain the waiters list, so no spinlocks are
  involved. Same caveats apply as for the rwlocks.

Revision 1.31.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 10:14:14 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.31.2.2: +19 -19 lines
Diff to previous 1.31.2.2 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 16 13:54:16 2007 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base4, nick-csl-alignment-base3
Branch point for: matt-armv6
Changes since 1.33: +19 -19 lines
Diff to previous 1.33 (colored)

Trim fat off libpthread internal spinlock operations. Makes a mesurable
improvement across the board.

Revision 1.31.2.2 / (download) - annotate - [select for diffs], Wed Aug 15 13:46:52 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.31.2.1: +79 -36 lines
Diff to previous 1.31.2.1 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Aug 7 19:04:21 2007 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base2
Changes since 1.32: +18 -4 lines
Diff to previous 1.32 (colored)

Change the signature of _lwp_park() to accept an lwpid_t and second
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Sat Aug 4 13:37:50 2007 UTC (15 years, 5 months ago) by ad
Branch: matt-mips64
Changes since 1.32.2.1: +428 -0 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Some significant performance improvements, and a fix for a race with pthread
detach/join.

- Make mutex acquire spin for a short time, as done with spinlocks.
- Make the number of spins controllable with the env var PTHREAD_NSPINS.
- Reduce the amount of time that libpthread internal spinlocks are held.
- Rely more on the barrier effects of park/unpark to avoid taking spinlocks.
- Simplify the locking around pthreads and the global queues.
- Align per-thread sync data on a 128 byte boundary.
- Offset thread stacks by a small amount to try and reduce cache thrash.

Revision 1.32.2.1, Sat Aug 4 13:37:49 2007 UTC (15 years, 5 months ago) by ad
Branch: matt-mips64
Changes since 1.32: +0 -428 lines
FILE REMOVED

file pthread_cond.c was added on branch matt-mips64 on 2007-08-04 13:37:50 +0000

Revision 1.32 / (download) - annotate - [select for diffs], Sat Aug 4 13:37:49 2007 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.31: +65 -36 lines
Diff to previous 1.31 (colored)

Some significant performance improvements, and a fix for a race with pthread
detach/join.

- Make mutex acquire spin for a short time, as done with spinlocks.
- Make the number of spins controllable with the env var PTHREAD_NSPINS.
- Reduce the amount of time that libpthread internal spinlocks are held.
- Rely more on the barrier effects of park/unpark to avoid taking spinlocks.
- Simplify the locking around pthreads and the global queues.
- Align per-thread sync data on a 128 byte boundary.
- Offset thread stacks by a small amount to try and reduce cache thrash.

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Wed Jul 18 13:36:19 2007 UTC (15 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.31: +5 -4 lines
Diff to previous 1.31 (colored)

Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 12 21:36:06 2007 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, hpcarm-cleanup
Branch point for: nick-csl-alignment
Changes since 1.30: +23 -6 lines
Diff to previous 1.30 (colored)

Mirror a fix made to the kernel's condvars:

After resuming execution, the thread must check to see if it
has been restarted as a result of pthread_cond_signal().  If it
has, but cannot take the wakeup (because of eg a pending Unix
signal or timeout) then try to ensure that another thread sees
it.  This is necessary because there may be multiple waiters,
and at least one should take the wakeup if possible.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Mar 24 18:52:00 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

- Test+branch is usually cheaper than making an indirect function call,
  so avoid making them.
- When parking an LWP on a condition variable, point the hint argument at
  the mutex's waiters queue. Chances are we will be awoken from that later.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 21 19:08:18 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Move PTHREADD_ADD(PTHREADD_COND_WOKEUP) back to the correct spot.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 20 23:49:58 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.27: +75 -21 lines
Diff to previous 1.27 (colored)

- When signalling waiters, try not to awaken them immediatley. If we hold
  the mutex that the waiters are using to synchronise, then transfer them
  to the mutex's waiters list so that the wakeup is deferred until release
  of the mutex. Improves the timings for CV sleep/wakeup by between 30-100%
  in tests conducted locally on a UP system. There can be a penalty for MP
  systems when only one thread is being awoken, but in practice I think it
  won't be be an issue.
- pthread_signal: search for a thread that does not have a pending wakeup.
  Threads can have a pending wakeup and still be on the waiters list if we
  clash with an earlier pthread_cond_broadcast().

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 14 23:34:48 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.26: +25 -29 lines
Diff to previous 1.26 (colored)

Cosmetic changes.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Mar 5 23:55:54 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.25: +12 -15 lines
Diff to previous 1.25 (colored)

- Update to match changed pthread__park() interface.
- Fix a bug where a thread could be "reentered" onto the waiters queue.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Mar 5 22:25:27 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.24: +4 -14 lines
Diff to previous 1.24 (colored)

Undo previous, it matches IEEE 1003.1.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 5 22:11:40 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.23: +16 -6 lines
Diff to previous 1.23 (colored)

Drop the interlock if cancelled.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 2 19:56:47 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.22: +15 -20 lines
Diff to previous 1.22 (colored)

Fix a sleep/wakeup race with condvars.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Mar 2 18:53:52 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.21: +4 -138 lines
Diff to previous 1.21 (colored)

Remove the PTHREAD_SA option. If M:N threads is reimplemented it's
better off done with a seperate library.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 2 17:47:40 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.20: +63 -33 lines
Diff to previous 1.20 (colored)

Don't grab the state lock to check for cancellation around condition
variables, as _lwp_wakeup/lwp_park provide the necessary barrier.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Dec 24 18:39:46 2006 UTC (16 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.19: +30 -14 lines
Diff to previous 1.19 (colored)

Fix bugs with and improve upon previous.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 23 05:14:46 2006 UTC (16 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.18: +39 -4 lines
Diff to previous 1.18 (colored)

Conditionalised support for 1:1 threads. Needs associated kernel changes
and more work to be useful.

Revision 1.14.2.2.2.1 / (download) - annotate - [select for diffs], Fri Apr 8 21:57:47 2005 UTC (17 years, 9 months ago) by tron
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.14.2.2: +7 -3 lines
Diff to previous 1.14.2.2 (colored) next main 1.15 (colored)

Pull up revision 1.17 (requested by nathanw in ticket #1065):
Correctly return ETIMEDOUT when the absolute time is in the past, in
the nonthreaded case. Fixes, and fix from, PR lib/25961.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jan 6 17:33:36 2005 UTC (18 years ago) by mycroft
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.17: +18 -24 lines
Diff to previous 1.17 (colored)

gettimeofday();TIMEVAL_TO_TIMESPEC(); is exactly equivalent to
clock_gettime(CLOCK_REALTIME), except the latter may have more preicison
some day.  So, use that.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Dec 10 17:11:53 2004 UTC (18 years, 1 month ago) by nathanw
Branch: MAIN
Changes since 1.16: +7 -3 lines
Diff to previous 1.16 (colored)

Correctly return ETIMEDOUT when the absolute time is in the past, in
the nonthreaded case. Fixes, and fix from, PR lib/25961.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Mon Oct 4 05:21:59 2004 UTC (18 years, 3 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.14.2.1: +12 -14 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Pullup rev 1.16 (requested by oster in ticket #885)

In cond_wait() and cond_timedwait(), do the ERRORCHECK testing of the
waiters list in all cases, not just on cancellation; there are other
sources of spurious wakeups, such as single-stepping in the debugger.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jul 27 21:44:48 2004 UTC (18 years, 6 months ago) by nathanw
Branch: MAIN
Changes since 1.15: +12 -14 lines
Diff to previous 1.15 (colored)

In cond_wait() and cond_timedwait(), do the ERRORCHECK testing of the
waiters list in all cases, not just on cancellation; there are other
sources of spurious wakeups, such as single-stepping in the debugger.

regress/lib/libpthread/conddestroy1 now passes.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Thu May 6 05:34:18 2004 UTC (18 years, 8 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-0-RC2, netbsd-2-0-RC1
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

Pullup rev 1.15 (requested by kleink in ticket #255)

In the nothread version, don't return EINTR if select() was interrupted
since this value is explicitly ruled out by POSIX.  Instead, return 0,
like a spurious wakeup. PR#24240.

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 3 09:13:34 2004 UTC (18 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

In the nothread version, don't return EINTR if select() was interrupted
since this value is explicitly ruled out by POSIX.  Instead, return 0,
like a spurious wakeup.  From YAMAMOTO Takashi in PR standards/24240.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 24 23:54:13 2003 UTC (19 years, 2 months ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.13: +6 -7 lines
Diff to previous 1.13 (colored)

Update mutex/rwlock/sem code to match recent change in cond code.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Nov 24 22:54:31 2003 UTC (19 years, 2 months ago) by nathanw
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

Fix a race between timed wait callbacks and manual signal/broadcasting
accidentally introduced in rev. 1.5.

Noted by Christian Limpach.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Nov 21 22:08:00 2003 UTC (19 years, 2 months ago) by nathanw
Branch: MAIN
Changes since 1.11: +39 -24 lines
Diff to previous 1.11 (colored)

Prevent ptc_mutex from remaining set if a CV sleep is woken by
cancellation:

 * Arrange to not set ptc_mutex until after the pre-sleep cancellation
   test.

 * In the post-sleep cancellation test, check if there are no more
   sleepers and clear ptc_mutex if so.

While here, sprinkle some __predict_false() around the cancellation
tests.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Apr 23 19:36:12 2003 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.10: +33 -18 lines
Diff to previous 1.10 (colored)

Use pthread__error() instead of pthread__abort().

Revision 1.10 / (download) - annotate - [select for diffs], Fri Apr 18 21:36:38 2003 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.9: +27 -66 lines
Diff to previous 1.9 (colored)

More agressive assertions. Change a number of detected conditions, which
officially have undefined behavior, from returning an error code to raising
an assertion failure.
Also, don't bother to explicitly test for (illegal) null pointers and return
an error; they'll bomb out soon enough.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Apr 16 18:30:44 2003 UTC (19 years, 9 months ago) by nathanw
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

When a thread sleeps on a mutex or cv, have it put itself on the
front of the sleep queue rather than the back. This is more
cache-friendly behavior and within the (lack of) constraints on wakeup
ordering imposed on equal-priority threads.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 8 08:03:35 2003 UTC (19 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored)

add __RCSID()

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 15 04:38:33 2003 UTC (19 years, 11 months ago) by nathanw
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

Remove debug toggle and add debug counter for signals and broadcasts
that actually wake another thread up.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 1 00:57:31 2003 UTC (20 years ago) by nathanw
Branch: MAIN
Changes since 1.5: +56 -2 lines
Diff to previous 1.5 (colored)

Arrange to pause for a while if pthread_cond_wait() or
pthread_cond_timedwait() is called before any threads have been
created and the SA infrastructure is up and running.

Addresses PR lib/20139.

XXX probably need to do this for all of the pthread_*_timedlock()
functions, too.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 31 04:59:40 2003 UTC (20 years ago) by nathanw
Branch: MAIN
Changes since 1.4: +4 -6 lines
Diff to previous 1.4 (colored)

Use pthread__sched_sleepers() instead of iterating over sleep queues
ourself.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 31 04:26:50 2003 UTC (20 years ago) by nathanw
Branch: MAIN
Changes since 1.3: +25 -21 lines
Diff to previous 1.3 (colored)

Do a similar tuneup on pthread_cond_signal() and
pthread_cond_broadcast(): use double-checked locking to avoid
pthread__self() and pthread_spinlock() when signaling or broadcasting
on a condition variable with no waiters.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jan 27 21:01:01 2003 UTC (20 years ago) by nathanw
Branch: MAIN
Changes since 1.2: +5 -1 lines
Diff to previous 1.2 (colored)

Add debug counters for mutex and condvar operations.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 18 10:34:15 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.1: +344 -0 lines
Diff to previous 1.1 (colored)

Merge the nathanw_sa branch.

Revision 1.1.2.18 / (download) - annotate - [select for diffs], Sat Jan 11 09:14:34 2003 UTC (20 years ago) by skrll
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.1.2.17: +18 -3 lines
Diff to previous 1.1.2.17 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Improve error checking.

OK'd by Nathan.

Revision 1.1.2.17 / (download) - annotate - [select for diffs], Thu Jan 9 19:27:51 2003 UTC (20 years ago) by thorpej
Branch: nathanw_sa
Changes since 1.1.2.16: +7 -7 lines
Diff to previous 1.1.2.16 (colored) to branchpoint 1.1 (colored)

Remove trailing semicolon from __strong_alias().

Revision 1.1.2.16 / (download) - annotate - [select for diffs], Wed Jan 8 19:34:22 2003 UTC (20 years ago) by thorpej
Branch: nathanw_sa
Changes since 1.1.2.15: +8 -1 lines
Diff to previous 1.1.2.15 (colored) to branchpoint 1.1 (colored)

Rewrite the way libpthread provides thread primitives to libc, using
strong and weak aliases (the way cancelation points are handled).

Work around lame Unix static library semantics which could cause
the wrong thread primitives or cancelation point functions to be
included in a statically-linked program.

THIS IS AN ABI CHANGE.  People running the nathanw_sa branch should
ensure that their libc and libpthread are in sync after updating.

Revision 1.1.2.15 / (download) - annotate - [select for diffs], Mon Dec 16 18:24:14 2002 UTC (20 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.14: +20 -12 lines
Diff to previous 1.1.2.14 (colored) to branchpoint 1.1 (colored)

Ensure that only one of an alarm callback or a signal/broadcast wakeup can
remove a thread from a condition-variable sleep and schedule it.

Don't call pthread__alarm_fired() until after pthread__alarm_del().

Revision 1.1.2.14 / (download) - annotate - [select for diffs], Mon Oct 28 17:44:22 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.13: +8 -10 lines
Diff to previous 1.1.2.13 (colored) to branchpoint 1.1 (colored)

A little whitespace cleanup, and use PTQ_INIT() rather than a
structure copy to clear the blocked queue in pthread_cond_broadcast().

Revision 1.1.2.13 / (download) - annotate - [select for diffs], Mon Oct 7 19:37:22 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.12: +11 -2 lines
Diff to previous 1.1.2.12 (colored) to branchpoint 1.1 (colored)

Put all assigning and testing of ptc_mutex inside #ifdef ERRORCHECK.

Revision 1.1.2.12 / (download) - annotate - [select for diffs], Tue Jul 16 13:26:30 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.11: +5 -5 lines
Diff to previous 1.1.2.11 (colored) to branchpoint 1.1 (colored)

Adapt to alarm changes.

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Tue Jul 16 01:15:57 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.10: +3 -1 lines
Diff to previous 1.1.2.10 (colored) to branchpoint 1.1 (colored)

Clear the ptc_mutex field in the pthread_cond_wait() callback if the
timed_wait was the last waiter.

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Mon May 20 17:47:02 2002 UTC (20 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.9: +24 -1 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored)

Record the sleep object in pthread_cond_timedwait().

Add debug logging (disabled by default).

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Fri Apr 26 17:45:57 2002 UTC (20 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.8: +2 -1 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored)

Track the synchronization object being slept on.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Thu Apr 11 02:51:36 2002 UTC (20 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.7: +1 -6 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored)

Revert weak aliases.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Mon Mar 25 03:46:01 2002 UTC (20 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.6: +6 -1 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored)

Provide interfaces to libc.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Mon Jan 28 19:03:09 2002 UTC (21 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.5: +82 -2 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

Implement pthread_cond_timedwait().
Cancellation support.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Sun Dec 30 02:15:08 2001 UTC (21 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.4: +2 -2 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

pt_queue_t -> pthread_queue_t.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Aug 7 22:39:04 2001 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.3: +2 -1 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Initialize the mutex in the condition variable structure in
pthread_cond_init().

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Mon Aug 6 20:51:41 2001 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.2: +2 -2 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

broadacst->broadcast
(Regression tests can also catch spelling errors!)

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Jul 25 23:53:01 2001 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.2.1: +56 -7 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Stadardize and clean up use of ERRORCHECK.
Implement pthread_{cond,mutex}attr_{init,destroy} and make the relevant
functions check for their validity.
(No non-default attribute values are supported, but these interfaces
 are required anyway).

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Wed Jul 25 21:24:13 2001 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1: +151 -0 lines
Diff to previous 1.1 (colored)

Implement most of condition variables
(pthread_cond_timedwait() is not yet done).

Revision 1.1, Wed Jul 25 21:24:13 2001 UTC (21 years, 6 months ago) by nathanw
Branch: MAIN
CVS Tags: nathanw_sa_before_merge
Branch point for: nathanw_sa
FILE REMOVED

file pthread_cond.c was initially added on branch nathanw_sa.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>