summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/objectget.c4
-rw-r--r--cpukit/score/src/objectgetisr.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/score/src/objectget.c b/cpukit/score/src/objectget.c
index 01d8683ca7..4c30d2a008 100644
--- a/cpukit/score/src/objectget.c
+++ b/cpukit/score/src/objectget.c
@@ -54,7 +54,9 @@ Objects_Control *_Objects_Get(
unsigned32 index;
/* index = _Objects_Get_index( id ); */
- index = (unsigned16) id;
+ index = id & 0x0000ffff;
+ /* This should work but doesn't always :( */
+ /* index = (unsigned16) id; */
if ( information->maximum >= index ) {
_Thread_Disable_dispatch();
diff --git a/cpukit/score/src/objectgetisr.c b/cpukit/score/src/objectgetisr.c
index ea63469e12..9d0951d9fd 100644
--- a/cpukit/score/src/objectgetisr.c
+++ b/cpukit/score/src/objectgetisr.c
@@ -58,7 +58,9 @@ Objects_Control *_Objects_Get_isr_disable(
ISR_Level level;
/* index = _Objects_Get_index( id ); */
- index = (unsigned16) id;
+ index = id & 0x0000ffff;
+ /* This should work but doesn't always :( */
+ /* index = (unsigned16) id; */
_ISR_Disable( level );
if ( information->maximum >= index ) {