Changeset 32d2e60 in mainline for uspace/lib/c/generic/futex.c


Ignore:
Timestamp:
2012-12-04T15:54:40Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b7acf38
Parents:
d54b303
Message:

Compilation fixes of upgradable futexes.

File:
1 edited

Legend:

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

    rd54b303 r32d2e60  
    3636#include <atomic.h>
    3737
     38
    3839/** Initialize futex counter.
    3940 *
     
    5051#ifdef FUTEX_UPGRADABLE
    5152
    52 int _upgrade_futex = 0;
     53int _upgrade_futexes = 0;
    5354static futex_t upg_and_wait_futex = FUTEX_INITIALIZER;
    5455
     
    5758        _futex_down(&upg_and_wait_futex);
    5859       
    59         if (!_upgrade_futex) {
    60                 rcu_assign(_upgrade_futex, 1);
    61                 rcu_synchronize();
     60        if (!_upgrade_futexes) {
     61                rcu_assign(_upgrade_futexes, 1);
     62                _rcu_synchronize(BM_BLOCK_THREAD);
    6263        }
    6364       
Note: See TracChangeset for help on using the changeset viewer.