Date: Sun, 2 May 2004 23:38:51 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= <des@des.no> Cc: freebsd-threads@freebsd.org Subject: Re: libthr, libpthread problems Message-ID: <Pine.GSO.4.10.10405022336340.1760-100000@pcnet5.pcnet.com> In-Reply-To: <xzp4qqyo08k.fsf@dwp.des.no>
index | next in thread | previous in thread | raw e-mail
On Mon, 3 May 2004, [iso-8859-1] Dag-Erling Smørgrav wrote: > Archie Cobbs <archie@dellroad.org> writes: > > Dan Eischen wrote: > > > Sounds like a bug in the application (recurse count shouldn't > > > be less than zero). > > Nope.. here's a simpler test case that demonstrates the problem: > > Perfectly reproducable, definitely a libthr bug: Yes, I replied yesterday with a patch to libthr to fix the problem, but the @threads address was screwed up in the message header so it never made the list. Here it is again. Index: thread/thr_mutex.c =================================================================== RCS file: /opt/FreeBSD/cvs/src/lib/libthr/thread/thr_mutex.c,v retrieving revision 1.25 diff -u -r1.25 thr_mutex.c --- thread/thr_mutex.c 29 Mar 2004 09:35:07 -0000 1.25 +++ thread/thr_mutex.c 1 May 2004 22:18:34 -0000 @@ -414,6 +414,8 @@ /* Nothing */ break; } + if ((*mutex)->m_type == PTHREAD_MUTEX_RECURSIVE) + (*mutex)->m_data.m_count++; _thread_critical_exit(curthread); out: _SPINUNLOCK(&(*mutex)->lock); -- Dan Eischenhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10405022336340.1760-100000>
