Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ba371e1 in mainline


Ignore:
Timestamp:
2010-02-20T22:04:13Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
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

Location:
kernel/arch
Files:
2 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        );
  • kernel/arch/ia32/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                 "movl $1, %[v]\n"
    107106                "xchgl %[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.