Changeset 69e9dd2 in mainline


Ignore:
Timestamp:
2007-04-06T14:36:11Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be66dee
Parents:
dd655970
Message:

fix uspace atomic_add according kernel code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/libc/arch/sparc64/include/atomic.h

    rdd655970 r69e9dd2  
    5252
    5353        do {
    54                 a = val->count;
     54                volatile uintptr_t x = (uint64_t) &val->count;
     55
     56                a = *((uint64_t *) x);
    5557                b = a + i;
    56                 asm volatile ("casx %0, %2, %1\n" : "+m" (*val), "+r" (b) : "r" (a));
     58                asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a));
    5759        } while (a != b);
    5860
Note: See TracChangeset for help on using the changeset viewer.