summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 22:28:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 22:28:15 +0000
commite001d84afb3b50c9c91f41eda05b78e45382fcff (patch)
tree026d68f5a85f1ab2add8b2d16ef4f77ba006880f /c/src/exec/score/src
parentce21604c211d73c70ca559b7f5e6b7a02d1dbb8f (diff)
downloadrtems-e001d84afb3b50c9c91f41eda05b78e45382fcff.tar.bz2
Use bitwise and not cast to unsigned16 to remove upper bits.
Diffstat (limited to 'c/src/exec/score/src')
-rw-r--r--c/src/exec/score/src/objectget.c4
-rw-r--r--c/src/exec/score/src/objectgetisr.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/c/src/exec/score/src/objectget.c b/c/src/exec/score/src/objectget.c
index 01d8683ca7..4c30d2a008 100644
--- a/c/src/exec/score/src/objectget.c
+++ b/c/src/exec/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/c/src/exec/score/src/objectgetisr.c b/c/src/exec/score/src/objectgetisr.c
index ea63469e12..9d0951d9fd 100644
--- a/c/src/exec/score/src/objectgetisr.c
+++ b/c/src/exec/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 ) {