Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/atomic.h

    r228666c rdf4ed85  
    2727 */
    2828
    29 /** @addtogroup ppc32
     29/** @addtogroup ppc32   
    3030 * @{
    3131 */
     
    3838static inline void atomic_inc(atomic_t *val)
    3939{
    40         atomic_count_t tmp;
    41        
     40        long tmp;
     41
    4242        asm volatile (
    4343                "1:\n"
     
    4646                "stwcx. %0, 0, %2\n"
    4747                "bne- 1b"
    48                 : "=&r" (tmp),
    49                   "=m" (val->count)
    50                 : "r" (&val->count),
    51                   "m" (val->count)
     48                : "=&r" (tmp), "=m" (val->count)
     49                : "r" (&val->count), "m" (val->count)
    5250                : "cc"
    5351        );
     
    5654static inline void atomic_dec(atomic_t *val)
    5755{
    58         atomic_count_t tmp;
    59        
     56        long tmp;
     57
    6058        asm volatile (
    6159                "1:\n"
    6260                "lwarx %0, 0, %2\n"
    6361                "addic %0, %0, -1\n"
    64                 "stwcx. %0, 0, %2\n"
     62                "stwcx. %0, 0, %2\n"
    6563                "bne- 1b"
    66                 : "=&r" (tmp),
    67                   "=m" (val->count)
    68                 : "r" (&val->count),
    69                   "m" (val->count)
     64                : "=&r" (tmp), "=m" (val->count)
     65                : "r" (&val->count), "m" (val->count)
    7066                : "cc"
    7167        );
    7268}
    7369
    74 static inline atomic_count_t atomic_postinc(atomic_t *val)
     70static inline long atomic_postinc(atomic_t *val)
    7571{
    7672        atomic_inc(val);
     
    7874}
    7975
    80 static inline atomic_count_t atomic_postdec(atomic_t *val)
     76static inline long atomic_postdec(atomic_t *val)
    8177{
    8278        atomic_dec(val);
     
    8480}
    8581
    86 static inline atomic_count_t atomic_preinc(atomic_t *val)
     82static inline long atomic_preinc(atomic_t *val)
    8783{
    8884        atomic_inc(val);
     
    9086}
    9187
    92 static inline atomic_count_t atomic_predec(atomic_t *val)
     88static inline long atomic_predec(atomic_t *val)
    9389{
    9490        atomic_dec(val);
Note: See TracChangeset for help on using the changeset viewer.