Changeset a8ef3bf0 in rtems


Ignore:
Timestamp:
Jun 11, 2013, 7:29:45 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
df244cfc
Parents:
f70526a7
git-author:
Sebastian Huber <sebastian.huber@…> (06/11/13 07:29:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/12/13 14:12:53)
Message:

smp: Add and use _Per_CPU_Lock_acquire()

Add and use _Per_CPU_Lock_release().

Location:
cpukit/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/percpu.h

    rf70526a7 ra8ef3bf0  
    268268  Per_CPU_State desired_state
    269269);
     270
     271#define _Per_CPU_Lock_acquire( per_cpu, isr_cookie ) \
     272  _SMP_lock_ISR_disable_and_acquire( &( per_cpu )->lock, isr_cookie )
     273
     274#define _Per_CPU_Lock_release( per_cpu, isr_cookie ) \
     275  _SMP_lock_Release_and_ISR_enable( &( per_cpu )->lock, isr_cookie )
    270276
    271277#endif
  • cpukit/score/src/smp.c

    rf70526a7 ra8ef3bf0  
    7171
    7272
    73   _SMP_lock_ISR_disable_and_acquire( &per_cpu->lock, level );
     73  _Per_CPU_Lock_acquire( per_cpu, level );
    7474  message = per_cpu->message;
    7575  per_cpu->message = 0;
    76   _SMP_lock_Release_and_ISR_enable( &per_cpu->lock, level );
     76  _Per_CPU_Lock_release( per_cpu, level );
    7777
    7878  #if defined(RTEMS_DEBUG)
     
    117117  #endif
    118118
    119   _SMP_lock_ISR_disable_and_acquire( &per_cpu->lock, level );
     119  _Per_CPU_Lock_acquire( per_cpu, level );
    120120  per_cpu->message |= message;
    121   _SMP_lock_Release_and_ISR_enable( &per_cpu->lock, level );
     121  _Per_CPU_Lock_release( per_cpu, level );
    122122
    123123  bsp_smp_interrupt_cpu( cpu );
     
    135135      ISR_Level level;
    136136
    137       _SMP_lock_ISR_disable_and_acquire( &per_cpu->lock, level );
     137      _Per_CPU_Lock_acquire( per_cpu, level );
    138138      per_cpu->message |= message;
    139       _SMP_lock_Release_and_ISR_enable( &per_cpu->lock, level );
     139      _Per_CPU_Lock_release( per_cpu, level );
    140140    }
    141141  }
Note: See TracChangeset for help on using the changeset viewer.