Date: Fri, 15 Jun 2001 21:10:04 -0700 (PDT) From: Brian Mitchell <bem@atlanta-bsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/27311: pthread_attr_setscope always fails Message-ID: <200106160410.f5G4A4r06699@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/27311; it has been noted by GNATS. From: Brian Mitchell <bem@atlanta-bsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106160410.f5G4A4r06699>