Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/locks.hfa

    r454f478 rac5816d  
    1313//-----------------------------------------------------------------------------
    1414// is_blocking_lock
    15 trait is_blocking_lock(L & | sized(L)) {
     15trait is_blocking_lock(dtype L | sized(L)) {
    1616        // For synchronization locks to use when acquiring
    1717        void on_notify( L &, struct $thread * );
     
    3131// the info thread is a wrapper around a thread used
    3232// to store extra data for use in the condition variable
    33 forall(L & | is_blocking_lock(L)) {
     33forall(dtype L | is_blocking_lock(L)) {
    3434        struct info_thread;
    3535
     
    120120//-----------------------------------------------------------------------------
    121121// Synchronization Locks
    122 forall(L & | is_blocking_lock(L)) {
     122forall(dtype L | is_blocking_lock(L)) {
    123123        struct condition_variable {
    124124                // Spin lock used for mutual exclusion
     
    157157        bool wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );
    158158}
    159 
    160 //-----------------------------------------------------------------------------
    161 // Semaphore
    162 struct semaphore {
    163         __spinlock_t lock;
    164         int count;
    165         __queue_t($thread) waiting;
    166 };
    167 
    168 void  ?{}(semaphore & this, int count = 1);
    169 void ^?{}(semaphore & this);
    170 bool   P (semaphore & this);
    171 bool   V (semaphore & this);
    172 bool   V (semaphore & this, unsigned count);
Note: See TracChangeset for help on using the changeset viewer.