Changeset b6de35e for libcfa/src/concurrency
- Timestamp:
- Nov 7, 2025, 8:28:03 AM (4 days ago)
- Branches:
- master
- Children:
- 0048327
- Parents:
- f5856ecd
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
-
future.hfa (modified) (2 diffs)
-
monitor.cfa (modified) (3 diffs)
-
monitor.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/future.hfa
rf5856ecd rb6de35e 10 10 // Created On : Wed Jan 06 17:33:18 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 23 22:41:10202513 // Update Count : 2 212 // Last Modified On : Tue Nov 4 22:04:42 2025 13 // Update Count : 23 14 14 // 15 15 … … 298 298 void reset(multi_future(T) & mutex this) { 299 299 if ( this.has_first != false ) abort("Attempting to reset a multi_future with at least one blocked threads"); 300 if ( ! is_empty(this.blocked) ) abort("Attempting to reset a multi_future with multiple blocked threads");300 if ( ! empty( this.blocked ) ) abort("Attempting to reset a multi_future with multiple blocked threads"); 301 301 reset( (future_t&)*(future_t*)((uintptr_t)&this + sizeof(monitor$)) ); 302 302 } -
libcfa/src/concurrency/monitor.cfa
rf5856ecd rb6de35e 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 25 07:20:22202513 // Update Count : 8 012 // Last Modified On : Tue Nov 4 22:03:41 2025 13 // Update Count : 82 14 14 // 15 15 … … 494 494 495 495 bool signal( condition & this ) libcfa_public { 496 if ( is_empty( this ) ) { return false; }496 if ( empty( this ) ) { return false; } 497 497 498 498 //Check that everything is as expected … … 581 581 // Access the user_info of the thread waiting at the front of the queue 582 582 uintptr_t front( condition & this ) libcfa_public { 583 verifyf( ! is_empty(this),583 verifyf( ! empty( this ), 584 584 "Attempt to access user data on an empty condition.\n" 585 585 "Possible cause is not checking if the condition is empty before reading stored data." -
libcfa/src/concurrency/monitor.hfa
rf5856ecd rb6de35e 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Feb 2 11:29:21 202313 // Update Count : 1 212 // Last Modified On : Tue Nov 4 21:56:17 2025 13 // Update Count : 16 14 14 // 15 15 … … 146 146 } 147 147 148 void wait ( condition & this, uintptr_t user_info = 0 ); 149 static inline bool is_empty ( condition & this ) { return this.blocked.head == 1p; } 150 bool signal ( condition & this ); 151 bool signal_block( condition & this ); 152 static inline bool signal_all ( condition & this ) { bool ret = false; while(!is_empty(this)) { ret = signal(this) || ret; } return ret; } 153 uintptr_t front ( condition & this ); 148 void wait( condition & this, uintptr_t user_info = 0 ); 149 static inline bool empty( condition & this ) { return this.blocked.head == 1p; } 150 bool signal ( condition & this ); 151 bool signal_block( condition & this ); 152 static inline bool signal_all( condition & this ) { 153 bool ret = false; 154 while ( !empty( this ) ) { 155 ret = signal(this) || ret; 156 } 157 return ret; 158 } 159 uintptr_t front( condition & this ); 154 160 155 161 //-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.