Changeset 6e569bf in mainline for uspace/lib/c/generic/futex.c


Ignore:
Timestamp:
2018-06-26T18:11:24Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
70fae4e
Parents:
8119363
Message:

Fix accidentally introduced build issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/futex.c

    r8119363 r6e569bf  
    8080void __futex_lock(futex_t *futex, const char *name)
    8181{
    82         /* We use relaxed atomics to avoid violating C11 memory model.
     82        /*
     83         * We use relaxed atomics to avoid violating C11 memory model.
    8384         * They should compile to regular load/stores, but simple assignments
    8485         * would be UB by definition.
     
    9091        futex_down(futex);
    9192
    92         void *prev_owner = __atomic_exchange_n(&futex->owner, self, __ATOMIC_RELAXED);
     93        void *prev_owner = __atomic_load_n(&futex->owner, __ATOMIC_RELAXED);
    9394        assert(prev_owner == NULL);
     95        __atomic_store_n(&futex->owner, self, __ATOMIC_RELAXED);
    9496
    9597        atomic_inc(&self->futex_locks);
Note: See TracChangeset for help on using the changeset viewer.