Date: Tue, 29 Feb 2000 22:50:57 -0500 (EST)
From: Daniel Eischen <eischen@vigrid.com>
To: John Polstra <jdp@polstra.com>
Cc: current@FreeBSD.ORG
Subject: Re: pthread_{suspend,resume}_np broken?
Message-ID: <Pine.SUN.3.91.1000229224700.20669A@pcnet1.pcnet.com>
In-Reply-To: <XFMail.000229181641.jdp@polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Feb 2000, John Polstra wrote:
> Either pthread_suspend_np() and pthread_resume_np() are broken in
> -current or I don't understand them. The attached program (cc
> -pthread suspend.c) starts two background threads. Each thread loops
> outputting a character ('1' or '2' according to which thread it is)
> and then sleeping for a second. Meanwhile, the main thread reads
> keypresses from the standard input. On each keypress it toggles
> background thread 1 between suspended and resumed.
[...]
> Shouldn't the test against PS_SUSPENDED be "==" instead of "!="? I
> would think we'd want to do something if the thread was suspended, and
> skip it if the thread wasn't suspended -- exactly the opposite of what
> the current code does.
Yes, it should be "==" instead of "!=".
Go ahead and fix it if you want :-)
Dan Eischen
eischen@vigrid.com
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?Pine.SUN.3.91.1000229224700.20669A>
