Follow us on Google+ Follow us on Facebook Follow us on Twitter

Changeset mainline,294


Ignore:
Timestamp:
2010-02-20T22:04:13Z (7 years ago)
Author:
Martin Decky <martin@…>
branch-nick:
head
revision id:
martin@uranus.dsrg.hide.ms.mff.cuni.cz-20100220220413-3ft0zg7i4yvidn7t
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:
mainline/kernel/arch
Files:
2 edited

Legend:

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

    r291 r294  
    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        );
  • mainline/kernel/arch/ia32/include/atomic.h

    r291 r294  
    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.