From owner-freebsd-current Thu Aug 6 08:49:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA25690 for freebsd-current-outgoing; Thu, 6 Aug 1998 08:49:49 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from coleridge.kublai.com (coleridge.kublai.com [207.96.1.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA25682 for ; Thu, 6 Aug 1998 08:49:42 -0700 (PDT) (envelope-from shmit@coleridge.kublai.com) Received: (from shmit@localhost) by coleridge.kublai.com (8.8.8/8.8.8) id LAA10010; Thu, 6 Aug 1998 11:49:02 -0400 (EDT) (envelope-from shmit) Message-ID: <19980806114859.65354@kublai.com> Date: Thu, 6 Aug 1998 11:48:59 -0400 From: Brian Cully To: John Birrell Cc: current@FreeBSD.ORG Subject: Re: Pthreads woes Reply-To: shmit@kublai.com References: <19980805180913.10635@kublai.com> <199808052302.JAA28909@cimlogic.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: <199808052302.JAA28909@cimlogic.com.au>; from John Birrell on Thu, Aug 06, 1998 at 09:02:19AM +1000 X-Sender: If your mailer pays attention to this, it's broken. X-PGP-Info: finger shmit@kublai.com for my public key. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Aug 06, 1998 at 09:02:19AM +1000, John Birrell wrote: > > The sequence of events is: > > > > main > > ---------------------- > > spawn threads > > loop { > > lock thread mutex > > wait for packet > > unlock mutex > > You keep the mutex locked while you wait? Yes, that way I don't have to waste time (even though it's a small amount) in mutex_lock after I get a packet (I want to /very/ quick response time). > > send signal to thread > > Signal a condition or a kill() signal? Sorry, I signal a condition with pthread_cond_signal(). > > If not, I'll see what I can do to make the test simpler. > > Does the code build cleanly (gcc -Wall) on -current, without using a GNU > configure script, and is it C code (not C++)? If yes, yes and yes, I'll > look at it. It builds -Wall and -Werror on -current from a couple of days ago, without using GNU configure (truly, configure is an abomination before the Lord), and it is entirely written in C; IOW, yes, yes, and yes. I'll send it to you privately, but don't fry your brain trying to find the problem, at this point I'm inclined to believe it's my fault. -bjc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message