Ignore:
Timestamp:
Dec 18, 2020, 12:25:10 PM (10 months ago)
Author:
Colby Alexander Parsons <caparsons@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
636d45f5
Parents:
68a867ee
Message:

added bool return to timeout routines and removed redundant listed field

File:
1 edited

Legend:

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

    r68a867ee rdff1fd1  
    3636                uintptr_t info;
    3737                L * lock;
    38                 bool listed;                                    // true if info_thread is on queue, false otherwise;
     38                bool signalled;                                 // true when signalled and false when timeout wakes thread
    3939        };
    4040
     
    4646        info_thread(L) *& Back( info_thread(L) * this );
    4747        info_thread(L) *& Next( info_thread(L) * this );
    48         bool listed( info_thread(L) * this );
    4948}
    5049
     
    5251//// Blocking Locks
    5352///////////////////////////////////////////////////////////////////
    54 
    55 // struct lock_thread {
    56 //      struct $thread * t;
    57 //      lock_thread * next;
    58 // };
    59 
    60 // void ?{}( lock_thread & this, struct $thread * thd );
    61 // void ^?{}( lock_thread & this );
    62 
    63 // lock_thread *& get_next( lock_thread & );
    6453
    6554struct blocking_lock {
     
    183172        int counter( condition_variable(L) & this );
    184173
    185         // TODO: look into changing timout routines to return bool showing if signalled or woken by kernel
    186174        void wait( condition_variable(L) & this );
    187175        void wait( condition_variable(L) & this, uintptr_t info );
    188         void wait( condition_variable(L) & this, Duration duration );
    189         void wait( condition_variable(L) & this, uintptr_t info, Duration duration );
    190         void wait( condition_variable(L) & this, Time time );
    191         void wait( condition_variable(L) & this, uintptr_t info, Time time );
     176        bool wait( condition_variable(L) & this, Duration duration );
     177        bool wait( condition_variable(L) & this, uintptr_t info, Duration duration );
     178        bool wait( condition_variable(L) & this, Time time );
     179        bool wait( condition_variable(L) & this, uintptr_t info, Time time );
    192180
    193181        void wait( condition_variable(L) & this, L & l );
    194182        void wait( condition_variable(L) & this, L & l, uintptr_t info );
    195         void wait( condition_variable(L) & this, L & l, Duration duration );
    196         void wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration );
    197         void wait( condition_variable(L) & this, L & l, Time time );
    198         void wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );
     183        bool wait( condition_variable(L) & this, L & l, Duration duration );
     184        bool wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration );
     185        bool wait( condition_variable(L) & this, L & l, Time time );
     186        bool wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );
    199187}
Note: See TracChangeset for help on using the changeset viewer.