On 2014-05-28 23:45, Gedare Bloom wrote:
@@ -200,27 +250,36 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Obtain(
>    MRSP_Status status;
>    const Scheduler_Control *scheduler = _Scheduler_Get( executing );
>    uint32_t scheduler_index = _Scheduler_Get_index( scheduler );
>+  Priority_Control initial_priority = executing->current_priority;
>    Priority_Control ceiling_priority =
>      _MRSP_Get_ceiling_priority( mrsp, scheduler_index );
>    bool priority_ok = !_Scheduler_Is_priority_higher_than(
>      scheduler,
>-    executing->current_priority,
>+    initial_priority,
>      ceiling_priority
>    );
>+  Resource_Node *owner = _Resource_Get_owner( &mrsp->Resource );
I'd put this after the priority_ok check, for better readability by
keeping the error check closer to the cause. (Ahem, this should
probably be in our conventions too, eh?)


This change would affect code generation and would make it less efficient. The _Scheduler_Is_priority_higher_than() calls a global function and thus owner would have to be saved/restored around this call.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to