Changeset 44940ee for libcfa/src/concurrency/invoke.h
- Timestamp:
- Feb 25, 2026, 12:56:30 AM (27 hours ago)
- Branches:
- stuck-waitfor-destruct
- Children:
- 88bb0b4
- Parents:
- a0548c2
- File:
-
- 1 edited
-
libcfa/src/concurrency/invoke.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/invoke.h
ra0548c2 r44940ee 159 159 // last function that acquired monitors 160 160 fptr_t func; 161 162 // hash-based function identity for cross-TU matching163 func_id_t func_id;164 161 }; 165 162 … … 291 288 (this.size){0}; 292 289 (this.func){NULL}; 293 (this.func_id){0}; 294 } 295 296 static inline void ?{}(__monitor_group_t & this, struct monitor$ ** data, __lock_size_t size, fptr_t func, func_id_t func_id) { 290 } 291 292 static inline void ?{}(__monitor_group_t & this, struct monitor$ ** data, __lock_size_t size, fptr_t func) { 297 293 (this.data){data}; 298 294 (this.size){size}; 299 295 (this.func){func}; 300 (this.func_id){func_id};301 296 } 302 297 … … 304 299 if( (lhs.data != 0) != (rhs.data != 0) ) return false; 305 300 if( lhs.size != rhs.size ) return false; 306 // Use hash-based comparison when both sides have a valid func_id, 307 // otherwise fall back to function pointer comparison (for library code 308 // like join() that cannot compute the hash at compile time). 309 if( lhs.func_id != 0 && rhs.func_id != 0 ) { 310 if( lhs.func_id != rhs.func_id ) return false; 311 } else { 312 if( lhs.func != rhs.func ) return false; 313 } 301 if( lhs.func != rhs.func ) return false; 314 302 315 303 // Check that all the monitors match … … 326 314 lhs.size = rhs.size; 327 315 lhs.func = rhs.func; 328 lhs.func_id = rhs.func_id;329 316 } 330 317 }
Note:
See TracChangeset
for help on using the changeset viewer.