Changeset 67a9159e in rtems


Ignore:
Timestamp:
Nov 22, 2012, 11:40:33 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3be0c9a
Parents:
1906a36
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/12 11:40:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/12 15:35:06)
Message:

score: Avoid superfluous loads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/thread.inl

    r1906a36 r67a9159e  
    7777  RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
    7878  {
    79     _Thread_Dispatch_disable_level++;
    80     return _Thread_Dispatch_disable_level;
     79    uint32_t level = _Thread_Dispatch_disable_level;
     80
     81    ++level;
     82    _Thread_Dispatch_disable_level = level;
     83
     84    return level;
    8185  }
    8286
     
    8791  RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
    8892  {
    89     _Thread_Dispatch_disable_level--;
    90     return _Thread_Dispatch_disable_level;
     93    uint32_t level = _Thread_Dispatch_disable_level;
     94
     95    --level;
     96    _Thread_Dispatch_disable_level = level;
     97
     98    return level;
    9199  }
    92100
Note: See TracChangeset for help on using the changeset viewer.