Changeset 121be3e for libcfa/src/concurrency/monitor.cfa
- Timestamp:
- Dec 4, 2019, 11:25:00 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 1a3040c
- Parents:
- 1d60da8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/monitor.cfa
r1d60da8 r121be3e 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 30 14:30:26 201813 // Update Count : 912 // Last Modified On : Wed Dec 4 07:55:14 2019 13 // Update Count : 10 14 14 // 15 15 … … 363 363 this.waiting_thread = waiting_thread; 364 364 this.count = count; 365 this.next = NULL;365 this.next = 0p; 366 366 this.user_info = user_info; 367 367 } … … 369 369 void ?{}(__condition_criterion_t & this ) with( this ) { 370 370 ready = false; 371 target = NULL;372 owner = NULL;373 next = NULL;371 target = 0p; 372 owner = 0p; 373 next = 0p; 374 374 } 375 375 … … 378 378 this.target = target; 379 379 this.owner = &owner; 380 this.next = NULL;380 this.next = 0p; 381 381 } 382 382 … … 387 387 388 388 // Check that everything is as expected 389 assertf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );389 assertf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors ); 390 390 verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count ); 391 391 verifyf( this.monitor_count < 32u, "Excessive monitor count (%"PRIiFAST16")", this.monitor_count ); … … 449 449 450 450 // Lock all monitors 451 lock_all( this.monitors, NULL, count );451 lock_all( this.monitors, 0p, count ); 452 452 453 453 //Pop the head of the waiting queue … … 471 471 472 472 //Check that everything is as expected 473 verifyf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );473 verifyf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors ); 474 474 verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count ); 475 475 … … 674 674 675 675 static inline void reset_mask( monitor_desc * this ) { 676 this->mask.accepted = NULL;677 this->mask.data = NULL;676 this->mask.accepted = 0p; 677 this->mask.data = 0p; 678 678 this->mask.size = 0; 679 679 } … … 816 816 } 817 817 818 __cfaabi_dbg_print_safe( "Kernel : Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL);819 return ready2run ? node->waiting_thread : NULL;818 __cfaabi_dbg_print_safe( "Kernel : Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : 0p ); 819 return ready2run ? node->waiting_thread : 0p; 820 820 } 821 821 … … 824 824 if( !this.monitors ) { 825 825 // __cfaabi_dbg_print_safe( "Branding\n" ); 826 assertf( thrd->monitors.data != NULL, "No current monitor to brand condition %p", thrd->monitors.data );826 assertf( thrd->monitors.data != 0p, "No current monitor to brand condition %p", thrd->monitors.data ); 827 827 this.monitor_count = thrd->monitors.size; 828 828
Note: See TracChangeset
for help on using the changeset viewer.