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
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message