Changeset a9ce782 for libcfa/src/concurrency/monitor.cfa
- Timestamp:
- Feb 7, 2026, 1:40:26 PM (39 hours ago)
- Branches:
- stuck-waitfor-destruct
- Parents:
- c7d106a
- git-author:
- Matthew Au-Yeung <mw2auyeu@…> (02/07/26 13:40:05)
- git-committer:
- Matthew Au-Yeung <mw2auyeu@…> (02/07/26 13:40:26)
- File:
-
- 1 edited
-
libcfa/src/concurrency/monitor.cfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/monitor.cfa
rc7d106a ra9ce782 140 140 } 141 141 142 static void __dtor_enter( monitor$ * this, fptr_t func, bool join ) {142 static void __dtor_enter( monitor$ * this, fptr_t func, func_id_t func_id, bool join ) { 143 143 thread$ * thrd = active_thread(); 144 144 #if defined( __CFA_WITH_VERIFY__ ) … … 190 190 __lock_size_t count = 1; 191 191 monitor$ ** monitors = &this; 192 __monitor_group_t group = { &this, 1, func };192 __monitor_group_t group = { &this, 1, func, func_id }; 193 193 if ( is_accepted( this, group) ) { 194 194 __cfaabi_dbg_print_safe( "Kernel : mon accepts dtor, block and signal it \n" ); … … 341 341 // Ctor for monitor guard 342 342 // Sorts monitors before entering 343 void ?{}( monitor_guard_t & this, monitor$ * m [], __lock_size_t count, fptr_t func ) libcfa_public {343 void ?{}( monitor_guard_t & this, monitor$ * m [], __lock_size_t count, fptr_t func, func_id_t func_id ) libcfa_public { 344 344 thread$ * thrd = active_thread(); 345 345 … … 355 355 356 356 // Update thread context (needed for conditions) 357 (thrd->monitors){m, count, func };357 (thrd->monitors){m, count, func, func_id}; 358 358 359 359 // __cfaabi_dbg_print_safe( "MGUARD : enter %d\n", count); 360 360 361 361 // Enter the monitors in order 362 __monitor_group_t group = {this.m, this.count, func };362 __monitor_group_t group = {this.m, this.count, func, func_id}; 363 363 enter( group ); 364 364 … … 367 367 368 368 void ?{}( monitor_guard_t & this, monitor$ * m [], __lock_size_t count ) libcfa_public { 369 this{ m, count, 0p };369 this{ m, count, 0p, 0 }; 370 370 } 371 371 … … 386 386 // Ctor for monitor guard 387 387 // Sorts monitors before entering 388 void ?{}( monitor_dtor_guard_t & this, monitor$ * m [], fptr_t func, bool join ) libcfa_public {388 void ?{}( monitor_dtor_guard_t & this, monitor$ * m [], fptr_t func, func_id_t func_id, bool join ) libcfa_public { 389 389 // optimization 390 390 thread$ * thrd = active_thread(); … … 400 400 401 401 // Update thread context (needed for conditions) 402 (thrd->monitors){m, 1, func };403 404 __dtor_enter( this.m, func, join );402 (thrd->monitors){m, 1, func, func_id}; 403 404 __dtor_enter( this.m, func, func_id, join ); 405 405 } 406 406
Note:
See TracChangeset
for help on using the changeset viewer.