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

    r9e1c942 r9a2d6e1  
    3535#define atomic_dec(x)   ((void) atomic_add(x, -1))
    3636
    37 #define atomic_inc_pre(x) (atomic_add(x, 1) - 1)
    38 #define atomic_dec_pre(x) (atomic_add(x, -1) + 1)
     37#define atomic_postinc(x) (atomic_add(x, 1) - 1)
     38#define atomic_postdec(x) (atomic_add(x, -1) + 1)
    3939
    40 #define atomic_inc_post(x) atomic_add(x, 1)
    41 #define atomic_dec_post(x) atomic_add(x, -1)
    42 
     40#define atomic_preinc(x) atomic_add(x, 1)
     41#define atomic_predec(x) atomic_add(x, -1)
    4342
    4443typedef struct { volatile __u32 count; } atomic_t;
Note: See TracChangeset for help on using the changeset viewer.