If user is seting scope process flag, clear PTHREAD_SCOPE_SYSTEM bit
accordingly. Reviewed by: deischen
This commit is contained in:
parent
fba3db9f57
commit
c5f1d9f6f8
@ -48,8 +48,10 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope)
|
||||
} else if ((contentionscope != PTHREAD_SCOPE_PROCESS) &&
|
||||
(contentionscope != PTHREAD_SCOPE_SYSTEM)) {
|
||||
ret = EINVAL;
|
||||
} else
|
||||
} else if (contentionscope == PTHREAD_SCOPE_SYSTEM) {
|
||||
(*attr)->flags |= contentionscope;
|
||||
|
||||
} else {
|
||||
(*attr)->flags &= ~PTHREAD_SCOPE_SYSTEM;
|
||||
}
|
||||
return (ret);
|
||||
}
|
||||
|
@ -48,8 +48,10 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope)
|
||||
} else if ((contentionscope != PTHREAD_SCOPE_PROCESS) &&
|
||||
(contentionscope != PTHREAD_SCOPE_SYSTEM)) {
|
||||
ret = EINVAL;
|
||||
} else
|
||||
} else if (contentionscope == PTHREAD_SCOPE_SYSTEM) {
|
||||
(*attr)->flags |= contentionscope;
|
||||
|
||||
} else {
|
||||
(*attr)->flags &= ~PTHREAD_SCOPE_SYSTEM;
|
||||
}
|
||||
return (ret);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user