mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 04:56:16 +08:00
make PTHREAD_SCOPE_SYSTEM an unsupported value for contentionscope.
This commit is contained in:
@@ -226,10 +226,12 @@ int pthread_attr_setscope(
|
||||
|
||||
switch ( contentionscope ) {
|
||||
case PTHREAD_SCOPE_PROCESS:
|
||||
case PTHREAD_SCOPE_SYSTEM:
|
||||
attr->contentionscope = contentionscope;
|
||||
return 0;
|
||||
|
||||
case PTHREAD_SCOPE_SYSTEM:
|
||||
return ENOSYS;
|
||||
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
@@ -636,7 +638,6 @@ int pthread_create(
|
||||
*/
|
||||
|
||||
#if 0
|
||||
int contentionscope;
|
||||
int schedpolicy;
|
||||
struct sched_param schedparam;
|
||||
|
||||
@@ -666,6 +667,14 @@ int pthread_create(
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the contentionscope since rtems only supports PROCESS wide
|
||||
* contention (i.e. no system wide contention).
|
||||
*/
|
||||
|
||||
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
||||
return ENOSYS;
|
||||
|
||||
/*
|
||||
* Interpret the scheduling parameters.
|
||||
*/
|
||||
|
||||
@@ -226,10 +226,12 @@ int pthread_attr_setscope(
|
||||
|
||||
switch ( contentionscope ) {
|
||||
case PTHREAD_SCOPE_PROCESS:
|
||||
case PTHREAD_SCOPE_SYSTEM:
|
||||
attr->contentionscope = contentionscope;
|
||||
return 0;
|
||||
|
||||
case PTHREAD_SCOPE_SYSTEM:
|
||||
return ENOSYS;
|
||||
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
@@ -636,7 +638,6 @@ int pthread_create(
|
||||
*/
|
||||
|
||||
#if 0
|
||||
int contentionscope;
|
||||
int schedpolicy;
|
||||
struct sched_param schedparam;
|
||||
|
||||
@@ -666,6 +667,14 @@ int pthread_create(
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the contentionscope since rtems only supports PROCESS wide
|
||||
* contention (i.e. no system wide contention).
|
||||
*/
|
||||
|
||||
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
||||
return ENOSYS;
|
||||
|
||||
/*
|
||||
* Interpret the scheduling parameters.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user