Changeset 9a2d6e1 in mainline for arch/ia32/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/ia32/include/atomic.h

    r9e1c942 r9a2d6e1  
    6060}
    6161
    62 static inline count_t atomic_inc_pre(atomic_t *val)
     62static inline count_t atomic_postinc(atomic_t *val)
    6363{
    6464        count_t r;
     
    7373}
    7474
    75 static inline count_t atomic_dec_pre(atomic_t *val)
     75static inline count_t atomic_postdec(atomic_t *val)
    7676{
    7777        count_t r;
     
    8686}
    8787
    88 #define atomic_inc_post(val) (atomic_inc_pre(val)+1)
    89 #define atomic_dec_post(val) (atomic_dec_pre(val)-1)
     88#define atomic_preinc(val) (atomic_postinc(val)+1)
     89#define atomic_predec(val) (atomic_postdec(val)-1)
    9090
    9191static inline __u32 test_and_set(atomic_t *val) {
Note: See TracChangeset for help on using the changeset viewer.