Date: Thu, 6 Aug 1998 16:15:53 -0400 From: Brian Cully <shmit@kublai.com> To: "Daniel M. Eischen" <eischen@vigrid.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Pthreads woes revisited. Message-ID: <19980806161553.44240@kublai.com> In-Reply-To: <35C9ED3D.41C67EA6@vigrid.com>; from Daniel M. Eischen on Thu, Aug 06, 1998 at 01:51:57PM -0400 References: <35C9ED3D.41C67EA6@vigrid.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 06, 1998 at 01:51:57PM -0400, Daniel M. Eischen wrote: > But your not yielding the CPU after the pthread_cond_signal(). > The waiter thread (thr_wait) should also take the mutex lock (busy) > before the pthread_cond_wait(). See the comments in the revised > copy of your code. >From what I can tell by looking at uthread_mutex.c:pthread_mutex_unlock() and uthread_cond.c:pthread_cond_wait(), I don't have to lock the mutex before calling pthread_cond_wait(). Regardless, I tried adding the extra pthread_mutex_lock() call, and things still fail in the same manner. Moreover, the fact that the location of the sleep() call makes a difference points to something more sinister. -bjc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980806161553.44240>