Changeset 05e2a7ad in mainline for arch/ia32/include/atomic.h


Ignore:
Timestamp:
2005-12-07T13:32:31Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
839470f
Parents:
253f8590
Message:

Add comments describing locking rules for some locks.
Cleanup.

File:
1 edited

Legend:

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

    r253f8590 r05e2a7ad  
    5454        atomic_t r;
    5555        __asm__ volatile (
    56                 "movl $1,%0;"
    57                 "lock xaddl %0,%1;"
     56                "movl $1, %0\n"
     57                "lock xaddl %0, %1\n"
    5858                : "=r"(r), "=m" (*val)
    5959        );
     
    6767        atomic_t r;
    6868        __asm__ volatile (
    69                 "movl $-1,%0;"
    70                 "lock xaddl %0,%1;"
     69                "movl $-1, %0\n"
     70                "lock xaddl %0, %1\n"
    7171                : "=r"(r), "=m" (*val)
    7272        );
     
    7676#define atomic_inc_post(val) (atomic_inc_pre(val)+1)
    7777#define atomic_dec_post(val) (atomic_dec_pre(val)-1)
    78 
    79 
    8078
    8179static inline int test_and_set(volatile int *val) {
Note: See TracChangeset for help on using the changeset viewer.