forked from Imagelibrary/rtems
fixed typo for NOTSUP -> ENOTSUP
This commit is contained in:
@@ -363,8 +363,7 @@ int pthread_attr_setscope(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PTHREAD_SCOPE_SYSTEM:
|
case PTHREAD_SCOPE_SYSTEM:
|
||||||
/* XXX needs to be ENOTSUP */
|
return ENOTSUP;
|
||||||
return ENOSYS;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@@ -381,7 +380,7 @@ int pthread_attr_getscope(
|
|||||||
int *contentionscope
|
int *contentionscope
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !contentionscope )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*contentionscope = attr->contentionscope;
|
*contentionscope = attr->contentionscope;
|
||||||
@@ -408,7 +407,7 @@ int pthread_attr_setinheritsched(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return ENOTSUP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,7 +421,7 @@ int pthread_attr_getinheritsched(
|
|||||||
int *inheritsched
|
int *inheritsched
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !inheritsched )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*inheritsched = attr->inheritsched;
|
*inheritsched = attr->inheritsched;
|
||||||
@@ -451,7 +450,7 @@ int pthread_attr_setschedpolicy(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return ENOTSUP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +464,7 @@ int pthread_attr_getschedpolicy(
|
|||||||
int *policy
|
int *policy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !policy )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*policy = attr->schedpolicy;
|
*policy = attr->schedpolicy;
|
||||||
@@ -691,7 +690,7 @@ int pthread_attr_getstacksize(
|
|||||||
size_t *stacksize
|
size_t *stacksize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !stacksize )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*stacksize = attr->stacksize;
|
*stacksize = attr->stacksize;
|
||||||
@@ -728,7 +727,7 @@ int pthread_attr_getstackaddr(
|
|||||||
void **stackaddr
|
void **stackaddr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !stackaddr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*stackaddr = attr->stackaddr;
|
*stackaddr = attr->stackaddr;
|
||||||
@@ -762,7 +761,7 @@ int pthread_attr_getdetachstate(
|
|||||||
int *detachstate
|
int *detachstate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !detachstate )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*detachstate = attr->detachstate;
|
*detachstate = attr->detachstate;
|
||||||
@@ -866,7 +865,7 @@ int pthread_create(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
||||||
return ENOSYS;
|
return ENOTSUP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interpret the scheduling parameters.
|
* Interpret the scheduling parameters.
|
||||||
@@ -961,7 +960,7 @@ int pthread_create(
|
|||||||
if ( !status ) {
|
if ( !status ) {
|
||||||
_POSIX_Threads_Free( the_thread );
|
_POSIX_Threads_Free( the_thread );
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return EINVAL;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1275,7 +1274,7 @@ int pthread_attr_getcputime(
|
|||||||
int *clock_allowed
|
int *clock_allowed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !clock_allowed )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*clock_allowed = attr->cputime_clock_allowed;
|
*clock_allowed = attr->cputime_clock_allowed;
|
||||||
|
|||||||
@@ -363,8 +363,7 @@ int pthread_attr_setscope(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case PTHREAD_SCOPE_SYSTEM:
|
case PTHREAD_SCOPE_SYSTEM:
|
||||||
/* XXX needs to be ENOTSUP */
|
return ENOTSUP;
|
||||||
return ENOSYS;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@@ -381,7 +380,7 @@ int pthread_attr_getscope(
|
|||||||
int *contentionscope
|
int *contentionscope
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !contentionscope )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*contentionscope = attr->contentionscope;
|
*contentionscope = attr->contentionscope;
|
||||||
@@ -408,7 +407,7 @@ int pthread_attr_setinheritsched(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return ENOTSUP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,7 +421,7 @@ int pthread_attr_getinheritsched(
|
|||||||
int *inheritsched
|
int *inheritsched
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !inheritsched )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*inheritsched = attr->inheritsched;
|
*inheritsched = attr->inheritsched;
|
||||||
@@ -451,7 +450,7 @@ int pthread_attr_setschedpolicy(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return ENOTSUP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +464,7 @@ int pthread_attr_getschedpolicy(
|
|||||||
int *policy
|
int *policy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !policy )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*policy = attr->schedpolicy;
|
*policy = attr->schedpolicy;
|
||||||
@@ -691,7 +690,7 @@ int pthread_attr_getstacksize(
|
|||||||
size_t *stacksize
|
size_t *stacksize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !stacksize )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*stacksize = attr->stacksize;
|
*stacksize = attr->stacksize;
|
||||||
@@ -728,7 +727,7 @@ int pthread_attr_getstackaddr(
|
|||||||
void **stackaddr
|
void **stackaddr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !stackaddr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*stackaddr = attr->stackaddr;
|
*stackaddr = attr->stackaddr;
|
||||||
@@ -762,7 +761,7 @@ int pthread_attr_getdetachstate(
|
|||||||
int *detachstate
|
int *detachstate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !detachstate )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*detachstate = attr->detachstate;
|
*detachstate = attr->detachstate;
|
||||||
@@ -866,7 +865,7 @@ int pthread_create(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
|
||||||
return ENOSYS;
|
return ENOTSUP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interpret the scheduling parameters.
|
* Interpret the scheduling parameters.
|
||||||
@@ -961,7 +960,7 @@ int pthread_create(
|
|||||||
if ( !status ) {
|
if ( !status ) {
|
||||||
_POSIX_Threads_Free( the_thread );
|
_POSIX_Threads_Free( the_thread );
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return EINVAL;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1275,7 +1274,7 @@ int pthread_attr_getcputime(
|
|||||||
int *clock_allowed
|
int *clock_allowed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized || !clock_allowed )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
*clock_allowed = attr->cputime_clock_allowed;
|
*clock_allowed = attr->cputime_clock_allowed;
|
||||||
|
|||||||
Reference in New Issue
Block a user