| Summary: | pthread_attr_setscope function fails unconditionally | ||
|---|---|---|---|
| Product: | Base System | Reporter: | yuri |
| Component: | misc | Assignee: | Jason Evans <jasone> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->jasone I'll look at this. 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 Duplicated with misc/27311. |
source file src/lib/lib_r/uthread/uthread_attr_setscope.c: pthread_attr_setscope fails unconditionally for any value of contentionscope. Fix: In << } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || (contentionscope != PTHREAD_SCOPE_SYSTEM) How-To-Repeat: --