From owner-freebsd-bugs Fri Jun 15 21:10:33 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A3F3437B403 for ; Fri, 15 Jun 2001 21:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5G4A4r06699; Fri, 15 Jun 2001 21:10:04 -0700 (PDT) (envelope-from gnats) Date: Fri, 15 Jun 2001 21:10:04 -0700 (PDT) Message-Id: <200106160410.f5G4A4r06699@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Brian Mitchell Subject: Re: misc/27311: pthread_attr_setscope always fails Reply-To: Brian Mitchell Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/27311; it has been noted by GNATS. From: Brian Mitchell To: freebsd-gnats-submit@FreeBSD.org Cc: rblaze@mail.ru Subject: Re: misc/27311: pthread_attr_setscope always fails Date: Sat, 16 Jun 2001 00:02:33 -0400 Something along these lines should let PTHREAD_SCOPE_PROCESS work, I believe. *** uthread_attr_setscope.c.old Fri Jun 15 23:28:19 2001 --- uthread_attr_setscope.c Fri Jun 15 23:47:49 2001 *************** *** 43,56 **** int ret = 0; if ((attr == NULL) || (*attr == NULL)) { ! /* Return an invalid argument: */ ! ret = EINVAL; ! } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || ! (contentionscope != PTHREAD_SCOPE_SYSTEM)) { ! /* We don't support PTHREAD_SCOPE_SYSTEM. */ ! ret = ENOTSUP; ! } else ! (*attr)->flags |= contentionscope; ! return(ret); } --- 43,62 ---- int ret = 0; if ((attr == NULL) || (*attr == NULL)) { ! return EINVAL; ! } ! switch(contentionscope) ! { ! case PTHREAD_SCOPE_SYSTEM: ! return ENOTSUP; ! case PTHREAD_SCOPE_PROCESS: ! (*attr)->flags |= contentionscope; ! return ret; ! default: ! return ENOTSUP; ! } ! /* not reached */ ! return ret; } + To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message