Changeset 87179ca in mainline


Ignore:
Timestamp:
2012-12-04T16:56:33Z (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:
6c1bb0d
Parents:
df7cbc6
Message:

Backed rwlock with futex lock instead of a futex semaphore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/rwlock.h

    rdf7cbc6 r87179ca  
    4949
    5050#define rwlock_initialize(rwlock)       futex_initialize((rwlock), 1)
    51 #define rwlock_read_lock(rwlock)        futex_down((rwlock))
    52 #define rwlock_write_lock(rwlock)       futex_down((rwlock))
    53 #define rwlock_read_unlock(rwlock)      futex_up((rwlock))
    54 #define rwlock_write_unlock(rwlock)     futex_up((rwlock))
     51#define rwlock_read_lock(rwlock)        futex_lock((rwlock))
     52#define rwlock_write_lock(rwlock)       futex_lock((rwlock))
     53#define rwlock_read_unlock(rwlock)      futex_unlock((rwlock))
     54#define rwlock_write_unlock(rwlock)     futex_unlock((rwlock))
    5555
    5656#endif
Note: See TracChangeset for help on using the changeset viewer.