Changeset 9a2d6e1 in mainline for arch/ia64/include/atomic.h


Ignore:
Timestamp:
2006-03-15T18:58:26Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
649799a
Parents:
9e1c942
Message:

Redefine semantics of unary atomic operations.
Add test to verify that an architecture understands the semantics correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/include/atomic.h

    r9e1c942 r9a2d6e1  
    3939 * @param imm Value to add.
    4040 *
    41  * @return Value after addition.
     41 * @return Value before addition.
    4242 */
    4343static inline count_t atomic_add(atomic_t *val, int imm)
     
    6363static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); }
    6464
    65 static inline count_t atomic_inc_pre(atomic_t *val) { return atomic_add(val, 1); }
    66 static inline count_t atomic_dec_pre(atomic_t *val) { return atomic_add(val, -1); }
     65static inline count_t atomic_preinc(atomic_t *val) { return atomic_add(val, 1) + 1; }
     66static inline count_t atomic_predec(atomic_t *val) { return atomic_add(val, -1) - 1; }
    6767
    68 static inline count_t atomic_inc_post(atomic_t *val) { return atomic_add(val, 1) + 1; }
    69 static inline count_t atomic_dec_post(atomic_t *val) { return atomic_add(val, -1) - 1; }
     68static inline count_t atomic_postinc(atomic_t *val) { return atomic_add(val, 1); }
     69static inline count_t atomic_postdec(atomic_t *val) { return atomic_add(val, -1); }
    7070
    7171#endif
Note: See TracChangeset for help on using the changeset viewer.