[rtems commit] score: Fix MrsP resource root change
Sebastian Huber
sebh at rtems.org
Fri Jul 4 12:44:18 UTC 2014
Module: rtems
Branch: master
Commit: 46cd17a3be28bd56ea47a874b52a1102beaba484
Changeset: http://git.rtems.org/rtems/commit/?id=46cd17a3be28bd56ea47a874b52a1102beaba484
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Jul 4 14:32:35 2014 +0200
score: Fix MrsP resource root change
Use the root of the owner for the new root, since the owner may depend
on a resource as well.
---
cpukit/score/include/rtems/score/mrspimpl.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h
index 2369d9d..5efb619 100644
--- a/cpukit/score/include/rtems/score/mrspimpl.h
+++ b/cpukit/score/include/rtems/score/mrspimpl.h
@@ -193,7 +193,10 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership(
_Chain_Append_unprotected( &mrsp->Rivals, &rival.Node );
_Resource_Add_rival( &mrsp->Resource, &executing->Resource_node );
_Resource_Node_set_dependency( &executing->Resource_node, &mrsp->Resource );
- _MRSP_Set_root( &executing->Resource_node, owner );
+ _MRSP_Set_root(
+ &executing->Resource_node,
+ _Resource_Node_get_root( owner )
+ );
if ( timeout > 0 ) {
_Watchdog_Initialize(
More information about the vc
mailing list