Changeset e84ab3d for libcfa/src/bits
- Timestamp:
- Jul 5, 2021, 4:44:20 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7f62b708
- Parents:
- ee23a8d
- Location:
- libcfa/src/bits
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/weakso_locks.cfa
ree23a8d re84ab3d 24 24 bool try_lock( blocking_lock & ) { return false; } 25 25 void unlock( blocking_lock & ) {} 26 void on_notify( blocking_lock &, struct $thread* ) {}26 void on_notify( blocking_lock &, struct thread$ * ) {} 27 27 size_t on_wait( blocking_lock & ) { return 0; } 28 28 void on_wakeup( blocking_lock &, size_t ) {} -
libcfa/src/bits/weakso_locks.hfa
ree23a8d re84ab3d 23 23 #include "containers/list.hfa" 24 24 25 struct $thread;25 struct thread$; 26 26 27 27 //----------------------------------------------------------------------------- … … 32 32 33 33 // List of blocked threads 34 dlist( $thread) blocked_threads;34 dlist( thread$ ) blocked_threads; 35 35 36 36 // Count of current blocked threads … … 44 44 45 45 // Current thread owning the lock 46 struct $thread* owner;46 struct thread$ * owner; 47 47 48 48 // Number of recursion level … … 56 56 bool try_lock( blocking_lock & this ) OPTIONAL_THREAD; 57 57 void unlock( blocking_lock & this ) OPTIONAL_THREAD; 58 void on_notify( blocking_lock & this, struct $thread* t ) OPTIONAL_THREAD;58 void on_notify( blocking_lock & this, struct thread$ * t ) OPTIONAL_THREAD; 59 59 size_t on_wait( blocking_lock & this ) OPTIONAL_THREAD; 60 60 void on_wakeup( blocking_lock & this, size_t ) OPTIONAL_THREAD; … … 74 74 static inline size_t on_wait ( multiple_acquisition_lock & this ) { return on_wait ( (blocking_lock &)this ); } 75 75 static inline void on_wakeup( multiple_acquisition_lock & this, size_t v ) { on_wakeup ( (blocking_lock &)this, v ); } 76 static inline void on_notify( multiple_acquisition_lock & this, struct $thread* t ){ on_notify( (blocking_lock &)this, t ); }76 static inline void on_notify( multiple_acquisition_lock & this, struct thread$ * t ){ on_notify( (blocking_lock &)this, t ); }
Note: See TracChangeset
for help on using the changeset viewer.