diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-12 06:37:01 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-13 08:22:58 +0100 |
commit | a00dff42cfdf201abe15829baeeb2b6341a0426b (patch) | |
tree | c155002e1d0b91337e2c60a237c114a998aa605f /cpukit/libcsupport | |
parent | d24b30156d00cfa997abb2453e86e0e8643f4df9 (diff) |
rtems: Add and use rtems_object_get_local_node()
Update #3841.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/error.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/getpgrp.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/getpid.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/utsname.c | 8 |
4 files changed, 11 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c index 0e65f8929b..7d76327f94 100644 --- a/cpukit/libcsupport/src/error.c +++ b/cpukit/libcsupport/src/error.c @@ -51,7 +51,7 @@ int rtems_verror( #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) - fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); + fprintf(stderr, "[%" PRIu16 "] ", rtems_object_get_local_node()); #endif chars_written += vfprintf(stderr, printf_format, arglist); diff --git a/cpukit/libcsupport/src/getpgrp.c b/cpukit/libcsupport/src/getpgrp.c index 208c7022f7..de372f3e8c 100644 --- a/cpukit/libcsupport/src/getpgrp.c +++ b/cpukit/libcsupport/src/getpgrp.c @@ -3,7 +3,7 @@ #endif #include <unistd.h> -#include <rtems/score/objectimpl.h> +#include <rtems.h> /* * 4.3.1 Get Process Group IDs, P1003.1b-1993, p. 89 @@ -16,5 +16,5 @@ pid_t getpgrp( void ) * this will always be the local node; */ - return _Objects_Local_node; + return rtems_object_get_local_node(); } diff --git a/cpukit/libcsupport/src/getpid.c b/cpukit/libcsupport/src/getpid.c index 53ab2f4dc8..e17b1f2585 100644 --- a/cpukit/libcsupport/src/getpid.c +++ b/cpukit/libcsupport/src/getpid.c @@ -11,7 +11,7 @@ #include <unistd.h> -#include <rtems/score/objectimpl.h> +#include <rtems.h> #include <rtems/seterr.h> /** @@ -19,7 +19,7 @@ */ pid_t getpid( void ) { - return _Objects_Local_node; + return rtems_object_get_local_node(); } #if defined(RTEMS_NEWLIB) && !defined(HAVE__GETPID_R) diff --git a/cpukit/libcsupport/src/utsname.c b/cpukit/libcsupport/src/utsname.c index 8cdd4be536..57ed914aad 100644 --- a/cpukit/libcsupport/src/utsname.c +++ b/cpukit/libcsupport/src/utsname.c @@ -23,7 +23,7 @@ #include <sys/utsname.h> #include <inttypes.h> -#include <rtems/score/objectimpl.h> +#include <rtems.h> #include <rtems/seterr.h> /* @@ -47,7 +47,11 @@ int uname( strncpy( name->sysname, "RTEMS", sizeof(name->sysname) ); - snprintf( name->nodename, sizeof(name->nodename), "Node %" PRId16, _Objects_Local_node ); + snprintf( + name->nodename, + sizeof(name->nodename), + "Node %" PRId16, rtems_object_get_local_node() + ); strncpy( name->release, RTEMS_VERSION, sizeof(name->release) ); |