Changeset 96


Ignore:
Timestamp:
Jun 29, 2017, 1:52:34 PM (7 years ago)
Author:
max@…
Message:

Mmh, fix the return values

Location:
trunk/hal/x86_64/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_internal.h

    r94 r96  
    4242
    4343uint32_t atomic_cas_32(volatile uint32_t *ptr, uint32_t exp, uint32_t new);
    44 void atomic_add_32(volatile uint32_t *ptr, int32_t incr);
     44uint32_t atomic_add_32(volatile uint32_t *ptr, int32_t incr);
    4545
    4646/* hal_gpt.c */
  • trunk/hal/x86_64/core/hal_remote.c

    r94 r96  
    7474                              uint32_t  new )
    7575{
    76         return atomic_cas_32((volatile uint32_t *)xp, old, new);
     76        return (atomic_cas_32((volatile uint32_t *)xp, old, new) == old);
    7777}
    7878
     
    8080                                uint32_t incr ) // XXX define as signed
    8181{
    82         atomic_add_32((volatile uint32_t *)xp, incr);
     82        return atomic_add_32((volatile uint32_t *)xp, incr);
    8383}
    8484
Note: See TracChangeset for help on using the changeset viewer.