Date: Thu, 6 Aug 1998 11:48:59 -0400 From: Brian Cully <shmit@kublai.com> To: John Birrell <jb@cimlogic.com.au> Cc: current@FreeBSD.ORG Subject: Re: Pthreads woes Message-ID: <19980806114859.65354@kublai.com> In-Reply-To: <199808052302.JAA28909@cimlogic.com.au>; from John Birrell on Thu, Aug 06, 1998 at 09:02:19AM %2B1000 References: <19980805180913.10635@kublai.com> <199808052302.JAA28909@cimlogic.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980806114859.65354>
