forked from Imagelibrary/rtems
added checks to validate values passed to set attribute routines
This commit is contained in:
@@ -142,8 +142,15 @@ int pthread_condattr_setpshared(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( pshared ) {
|
||||||
|
case PTHREAD_PROCESS_SHARED:
|
||||||
|
case PTHREAD_PROCESS_PRIVATE:
|
||||||
attr->process_shared = pshared;
|
attr->process_shared = pshared;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -151,8 +151,15 @@ int pthread_mutexattr_setpshared(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( pshared ) {
|
||||||
|
case PTHREAD_PROCESS_SHARED:
|
||||||
|
case PTHREAD_PROCESS_PRIVATE:
|
||||||
attr->process_shared = pshared;
|
attr->process_shared = pshared;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -466,8 +473,16 @@ int pthread_mutexattr_setprotocol(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( protocol ) {
|
||||||
|
case PTHREAD_PRIO_NONE:
|
||||||
|
case PTHREAD_PRIO_INHERIT:
|
||||||
|
case PTHREAD_PRIO_PROTECT:
|
||||||
attr->protocol = protocol;
|
attr->protocol = protocol;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ int kill(
|
|||||||
int sig
|
int sig
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
/* SIGABRT comes from abort via assert */
|
/* SIGABRT comes from abort via assert */
|
||||||
if ( sig == SIGABRT ) {
|
if ( sig == SIGABRT ) {
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ User_extensions_routine _POSIX_Threads_Delete_extension(
|
|||||||
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_POSIX ] );
|
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_POSIX ] );
|
||||||
|
|
||||||
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
|
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
|
||||||
|
|
||||||
|
/* XXX run _POSIX_Keys_Run_destructors here? */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -225,13 +227,12 @@ int pthread_attr_setscope(
|
|||||||
switch ( contentionscope ) {
|
switch ( contentionscope ) {
|
||||||
case PTHREAD_SCOPE_PROCESS:
|
case PTHREAD_SCOPE_PROCESS:
|
||||||
case PTHREAD_SCOPE_SYSTEM:
|
case PTHREAD_SCOPE_SYSTEM:
|
||||||
break;
|
attr->contentionscope = contentionscope;
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
attr->contentionscope = contentionscope;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -267,13 +268,12 @@ int pthread_attr_setinheritsched(
|
|||||||
switch ( inheritsched ) {
|
switch ( inheritsched ) {
|
||||||
case PTHREAD_INHERIT_SCHED:
|
case PTHREAD_INHERIT_SCHED:
|
||||||
case PTHREAD_EXPLICIT_SCHED:
|
case PTHREAD_EXPLICIT_SCHED:
|
||||||
break;
|
attr->inheritsched = inheritsched;
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
attr->inheritsched = inheritsched;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -306,8 +306,17 @@ int pthread_attr_setschedpolicy(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( policy ) {
|
||||||
|
case SCHED_OTHER:
|
||||||
|
case SCHED_FIFO:
|
||||||
|
case SCHED_RR:
|
||||||
|
case SCHED_SPORADIC:
|
||||||
attr->schedpolicy = policy;
|
attr->schedpolicy = policy;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -401,9 +410,18 @@ int pthread_setschedparam(
|
|||||||
if ( !param )
|
if ( !param )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( policy ) {
|
||||||
|
case SCHED_OTHER:
|
||||||
|
case SCHED_FIFO:
|
||||||
|
case SCHED_RR:
|
||||||
|
case SCHED_SPORADIC:
|
||||||
attr->schedpolicy = policy;
|
attr->schedpolicy = policy;
|
||||||
attr->schedparam = *param;
|
attr->schedparam = *param;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -539,8 +557,15 @@ int pthread_attr_setdetachstate(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( detachstate ) {
|
||||||
|
case PTHREAD_CREATE_DETACHED:
|
||||||
|
case PTHREAD_CREATE_JOINABLE:
|
||||||
attr->detachstate = detachstate;
|
attr->detachstate = detachstate;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -733,6 +758,8 @@ void pthread_exit(
|
|||||||
* XXX Will need to deal with join/detach
|
* XXX Will need to deal with join/detach
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* XXX run _POSIX_Keys_Run_destructors here? */
|
||||||
|
|
||||||
_Thread_Close( &_POSIX_Threads_Information, the_thread );
|
_Thread_Close( &_POSIX_Threads_Information, the_thread );
|
||||||
|
|
||||||
_POSIX_Threads_Free( the_thread );
|
_POSIX_Threads_Free( the_thread );
|
||||||
@@ -829,8 +856,15 @@ int pthread_attr_setcputime(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( clock_allowed ) {
|
||||||
|
case CLOCK_ENABLED:
|
||||||
|
case CLOCK_DISABLED:
|
||||||
attr->cputime_clock_allowed = clock_allowed;
|
attr->cputime_clock_allowed = clock_allowed;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ int sched_setscheduler(
|
|||||||
const struct sched_param *param
|
const struct sched_param *param
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return POSIX_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +66,12 @@ int sched_getscheduler(
|
|||||||
pid_t pid
|
pid_t pid
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return POSIX_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,10 +117,14 @@ int sched_rr_get_interval(
|
|||||||
|
|
||||||
/* XXX should get for errors? (bad pid) */
|
/* XXX should get for errors? (bad pid) */
|
||||||
|
|
||||||
|
/* XXX some of the time routines also convert usecs to a timespec -- */
|
||||||
|
/* XXX should this be a common routine? */
|
||||||
|
|
||||||
us_per_quantum = _TOD_Microseconds_per_tick * _Thread_Ticks_per_timeslice;
|
us_per_quantum = _TOD_Microseconds_per_tick * _Thread_Ticks_per_timeslice;
|
||||||
|
|
||||||
interval->tv_sec = us_per_quantum / TOD_MICROSECONDS_PER_SECOND;
|
interval->tv_sec = us_per_quantum / TOD_MICROSECONDS_PER_SECOND;
|
||||||
interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) * 1000;
|
interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) *
|
||||||
|
TOD_NANOSECONDS_PER_MICROSECOND;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
#include <rtems/score/object.h>
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
|
|
||||||
pid_t getpid( void )
|
pid_t getpid( void )
|
||||||
{
|
{
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return _Objects_Local_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -142,8 +142,15 @@ int pthread_condattr_setpshared(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( pshared ) {
|
||||||
|
case PTHREAD_PROCESS_SHARED:
|
||||||
|
case PTHREAD_PROCESS_PRIVATE:
|
||||||
attr->process_shared = pshared;
|
attr->process_shared = pshared;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -151,8 +151,15 @@ int pthread_mutexattr_setpshared(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( pshared ) {
|
||||||
|
case PTHREAD_PROCESS_SHARED:
|
||||||
|
case PTHREAD_PROCESS_PRIVATE:
|
||||||
attr->process_shared = pshared;
|
attr->process_shared = pshared;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -466,8 +473,16 @@ int pthread_mutexattr_setprotocol(
|
|||||||
if ( !attr )
|
if ( !attr )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( protocol ) {
|
||||||
|
case PTHREAD_PRIO_NONE:
|
||||||
|
case PTHREAD_PRIO_INHERIT:
|
||||||
|
case PTHREAD_PRIO_PROTECT:
|
||||||
attr->protocol = protocol;
|
attr->protocol = protocol;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ int kill(
|
|||||||
int sig
|
int sig
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
/* SIGABRT comes from abort via assert */
|
/* SIGABRT comes from abort via assert */
|
||||||
if ( sig == SIGABRT ) {
|
if ( sig == SIGABRT ) {
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ User_extensions_routine _POSIX_Threads_Delete_extension(
|
|||||||
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_POSIX ] );
|
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_POSIX ] );
|
||||||
|
|
||||||
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
|
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
|
||||||
|
|
||||||
|
/* XXX run _POSIX_Keys_Run_destructors here? */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -225,13 +227,12 @@ int pthread_attr_setscope(
|
|||||||
switch ( contentionscope ) {
|
switch ( contentionscope ) {
|
||||||
case PTHREAD_SCOPE_PROCESS:
|
case PTHREAD_SCOPE_PROCESS:
|
||||||
case PTHREAD_SCOPE_SYSTEM:
|
case PTHREAD_SCOPE_SYSTEM:
|
||||||
break;
|
attr->contentionscope = contentionscope;
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
attr->contentionscope = contentionscope;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -267,13 +268,12 @@ int pthread_attr_setinheritsched(
|
|||||||
switch ( inheritsched ) {
|
switch ( inheritsched ) {
|
||||||
case PTHREAD_INHERIT_SCHED:
|
case PTHREAD_INHERIT_SCHED:
|
||||||
case PTHREAD_EXPLICIT_SCHED:
|
case PTHREAD_EXPLICIT_SCHED:
|
||||||
break;
|
attr->inheritsched = inheritsched;
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
attr->inheritsched = inheritsched;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -306,8 +306,17 @@ int pthread_attr_setschedpolicy(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( policy ) {
|
||||||
|
case SCHED_OTHER:
|
||||||
|
case SCHED_FIFO:
|
||||||
|
case SCHED_RR:
|
||||||
|
case SCHED_SPORADIC:
|
||||||
attr->schedpolicy = policy;
|
attr->schedpolicy = policy;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -401,9 +410,18 @@ int pthread_setschedparam(
|
|||||||
if ( !param )
|
if ( !param )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( policy ) {
|
||||||
|
case SCHED_OTHER:
|
||||||
|
case SCHED_FIFO:
|
||||||
|
case SCHED_RR:
|
||||||
|
case SCHED_SPORADIC:
|
||||||
attr->schedpolicy = policy;
|
attr->schedpolicy = policy;
|
||||||
attr->schedparam = *param;
|
attr->schedparam = *param;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -539,8 +557,15 @@ int pthread_attr_setdetachstate(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( detachstate ) {
|
||||||
|
case PTHREAD_CREATE_DETACHED:
|
||||||
|
case PTHREAD_CREATE_JOINABLE:
|
||||||
attr->detachstate = detachstate;
|
attr->detachstate = detachstate;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -733,6 +758,8 @@ void pthread_exit(
|
|||||||
* XXX Will need to deal with join/detach
|
* XXX Will need to deal with join/detach
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* XXX run _POSIX_Keys_Run_destructors here? */
|
||||||
|
|
||||||
_Thread_Close( &_POSIX_Threads_Information, the_thread );
|
_Thread_Close( &_POSIX_Threads_Information, the_thread );
|
||||||
|
|
||||||
_POSIX_Threads_Free( the_thread );
|
_POSIX_Threads_Free( the_thread );
|
||||||
@@ -829,8 +856,15 @@ int pthread_attr_setcputime(
|
|||||||
if ( !attr || !attr->is_initialized )
|
if ( !attr || !attr->is_initialized )
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
switch ( clock_allowed ) {
|
||||||
|
case CLOCK_ENABLED:
|
||||||
|
case CLOCK_DISABLED:
|
||||||
attr->cputime_clock_allowed = clock_allowed;
|
attr->cputime_clock_allowed = clock_allowed;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ int sched_setscheduler(
|
|||||||
const struct sched_param *param
|
const struct sched_param *param
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return POSIX_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +66,12 @@ int sched_getscheduler(
|
|||||||
pid_t pid
|
pid_t pid
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Only supported for the "calling process" (i.e. this node).
|
||||||
|
*/
|
||||||
|
|
||||||
|
assert( pid == getpid() );
|
||||||
|
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return POSIX_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,10 +117,14 @@ int sched_rr_get_interval(
|
|||||||
|
|
||||||
/* XXX should get for errors? (bad pid) */
|
/* XXX should get for errors? (bad pid) */
|
||||||
|
|
||||||
|
/* XXX some of the time routines also convert usecs to a timespec -- */
|
||||||
|
/* XXX should this be a common routine? */
|
||||||
|
|
||||||
us_per_quantum = _TOD_Microseconds_per_tick * _Thread_Ticks_per_timeslice;
|
us_per_quantum = _TOD_Microseconds_per_tick * _Thread_Ticks_per_timeslice;
|
||||||
|
|
||||||
interval->tv_sec = us_per_quantum / TOD_MICROSECONDS_PER_SECOND;
|
interval->tv_sec = us_per_quantum / TOD_MICROSECONDS_PER_SECOND;
|
||||||
interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) * 1000;
|
interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) *
|
||||||
|
TOD_NANOSECONDS_PER_MICROSECOND;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
#include <rtems/score/object.h>
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
|
|
||||||
pid_t getpid( void )
|
pid_t getpid( void )
|
||||||
{
|
{
|
||||||
return POSIX_NOT_IMPLEMENTED();
|
return _Objects_Local_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
Reference in New Issue
Block a user