Ignore:
Timestamp:
May 26, 2021, 10:38:19 AM (12 months ago)
Author:
caparsons <caparson@…>
Branches:
enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr
Children:
bae0d35
Parents:
c65b930
Message:

switched unified locking to use dlist

File:
1 edited

Legend:

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

    rc65b930 r82f4063  
    2121#include "bits/weakso_locks.hfa"
    2222#include "containers/queueLockFree.hfa"
     23#include "containers/list.hfa"
    2324
    2425#include "thread.hfa"
     
    4041
    4142static inline bool P(Semaphore0nary & this, $thread * thrd) {
    42         /* paranoid */ verify(!(thrd->seqable.next));
    43         /* paranoid */ verify(!(thrd`next));
     43        /* paranoid */ verify(!thrd`next);
     44        /* paranoid */ verify(!(&(*thrd)`next));
    4445
    4546        push(this.queue, thrd);
     
    250251
    251252//-----------------------------------------------------------------------------
    252 // info_thread
    253 // the info thread is a wrapper around a thread used
    254 // to store extra data for use in the condition variable
     253// // info_thread
     254// // the info thread is a wrapper around a thread used
     255// // to store extra data for use in the condition variable
    255256forall(L & | is_blocking_lock(L)) {
    256257        struct info_thread;
    257258
    258         // for use by sequence
    259         info_thread(L) *& Back( info_thread(L) * this );
    260         info_thread(L) *& Next( info_thread(L) * this );
     259        // // for use by sequence
     260        // info_thread(L) *& Back( info_thread(L) * this );
     261        // info_thread(L) *& Next( info_thread(L) * this );
    261262}
    262263
     
    269270
    270271                // List of blocked threads
    271                 Sequence( info_thread(L) ) blocked_threads;
     272                dlist( info_thread(L) ) blocked_threads;
    272273
    273274                // Count of current blocked threads
    274275                int count;
    275276        };
     277       
    276278
    277279        void  ?{}( condition_variable(L) & this );
Note: See TracChangeset for help on using the changeset viewer.