Changeset 10c071e in mainline for arch/ia32/include/atomic.h


Ignore:
Timestamp:
2005-12-15T16:57:48Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c68b97
Parents:
b4cad8b2
Message:

Fix ia64 and sparc64 to compile with new atomic_t.
Fix rwlock test #5 and semaphore test #1 to compile with new atomic_t.

sparc64 work.
TBA must be set before a function call when MMU is switched off.

File:
1 edited

Legend:

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

    rb4cad8b2 r10c071e  
    6060}
    6161
    62 static inline atomic_t atomic_inc_pre(atomic_t *val)
     62static inline count_t atomic_inc_pre(atomic_t *val)
    6363{
    64         atomic_t r;
     64        count_t r;
     65
    6566        __asm__ volatile (
    6667                "movl $1, %0\n"
    6768                "lock xaddl %0, %1\n"
    68                 : "=r"(r), "=m" (val->count)
     69                : "=r" (r), "=m" (val->count)
    6970        );
     71
    7072        return r;
    7173}
    7274
    73 
    74 
    75 static inline atomic_t atomic_dec_pre(atomic_t *val)
     75static inline count_t atomic_dec_pre(atomic_t *val)
    7676{
    77         atomic_t r;
     77        count_t r;
     78       
    7879        __asm__ volatile (
    7980                "movl $-1, %0\n"
    8081                "lock xaddl %0, %1\n"
    81                 : "=r"(r), "=m" (*val)
     82                : "=r" (r), "=m" (*val)
    8283        );
     84       
    8385        return r;
    8486}
Note: See TracChangeset for help on using the changeset viewer.