Changeset ba371e1 in mainline for kernel/arch/amd64/include/atomic.h


Ignore:
Timestamp:
2010-02-20T22:04:13Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aa30c7f
Parents:
7af8c0e
Message:

conclude Clang support
this is the final piece which was missing to make HelenOS not only compilable with Clang, but make it actually run properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/atomic.h

    r7af8c0e rba371e1  
    101101static inline atomic_count_t test_and_set(atomic_t *val)
    102102{
    103         atomic_count_t v;
     103        atomic_count_t v = 1;
    104104       
    105105        asm volatile (
    106                 "movq $1, %[v]\n"
    107106                "xchgq %[v], %[count]\n"
    108                 : [v] "=r" (v),
     107                : [v] "+r" (v),
    109108                  [count] "+m" (val->count)
    110109        );
Note: See TracChangeset for help on using the changeset viewer.