From nobody@FreeBSD.org  Thu Sep 20 17:44:52 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id CF52737B40C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 20 Sep 2001 17:44:51 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f8L0ip981720;
	Thu, 20 Sep 2001 17:44:51 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109210044.f8L0ip981720@freefall.freebsd.org>
Date: Thu, 20 Sep 2001 17:44:51 -0700 (PDT)
From: Yuri Victorovich <yuri@tsoft.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pthread_attr_setscope function fails unconditionally
X-Send-Pr-Version: www-1.0

>Number:         30699
>Category:       misc
>Synopsis:       pthread_attr_setscope function fails unconditionally
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jasone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 20 17:50:03 PDT 2001
>Closed-Date:    Thu Feb 14 02:49:06 PST 2002
>Last-Modified:  Thu Feb 14 02:49:47 PST 2002
>Originator:     Yuri Victorovich
>Release:        4.3
>Organization:
Philips
>Environment:
FreeBSD sunflower 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sun Jul 22 16:11:17 CEST 2001     root@sunflower:/root/src/sys/compile/GENERIC  i386
b
>Description:
source file src/lib/lib_r/uthread/uthread_attr_setscope.c:
pthread_attr_setscope fails unconditionally for any value of contentionscope.


>How-To-Repeat:
--
>Fix:
In
<<
        } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) ||
            (contentionscope != PTHREAD_SCOPE_SYSTEM)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jasone 
Responsible-Changed-By: jasone 
Responsible-Changed-When: Mon Dec 17 12:43:06 PST 2001 
Responsible-Changed-Why:  
I'll look at this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30699 

From: Maxim Konovalov <maxim@macomnet.ru>
To: Yuri Victorovich <yuri@tsoft.com>
Cc: jasone@freebsd.org, <freebsd-gnats-submit@freebsd.org>
Subject: Re: misc/30699: pthread_attr_setscope function fails unconditionally
Date: Wed, 13 Feb 2002 22:22:02 +0300 (MSK)

 The fix is obvious:
 
 Index: uthread_attr_setscope.c
 ===================================================================
 RCS file: /home/ncvs/src/lib/libc_r/uthread/uthread_attr_setscope.c,v
 retrieving revision 1.6
 diff -u -r1.6 uthread_attr_setscope.c
 --- uthread_attr_setscope.c	10 Apr 2001 04:19:19 -0000	1.6
 +++ uthread_attr_setscope.c	13 Feb 2002 19:06:33 -0000
 @@ -46,7 +46,7 @@
  		/* Return an invalid argument: */
  		ret = EINVAL;
  	} else if ((contentionscope != PTHREAD_SCOPE_PROCESS) ||
 -	    (contentionscope != PTHREAD_SCOPE_SYSTEM)) {
 +	    (contentionscope == PTHREAD_SCOPE_SYSTEM)) {
  		/* We don't support PTHREAD_SCOPE_SYSTEM. */
  		ret = ENOTSUP;
  	} else
 
 -- 
 Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
 phone: +7 (095) 796-9079, mailto:maxim@macomnet.ru
 
 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Thu Feb 14 02:49:06 PST 2002 
State-Changed-Why:  
Duplicated with misc/27311. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30699 
>Unformatted:
 >>
 should be && instead.
 
 
