Changeset 6a5be52
- Timestamp:
- Oct 27, 2017, 5:54:56 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- af0c8da
- Parents:
- 9f0b975
- Location:
- src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/Makefile.am
r9f0b975 r6a5be52 50 50 51 51 ctxswitch-cfa_coroutine$(EXEEXT): 52 ${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet52 ${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 53 53 54 54 ctxswitch-cfa_thread$(EXEEXT): 55 ${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet55 ${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 56 56 57 57 ctxswitch-upp_coroutine$(EXEEXT): 58 u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet58 u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 59 59 60 60 ctxswitch-upp_thread$(EXEEXT): 61 u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet61 u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 62 62 63 63 ctxswitch-pthread$(EXEEXT): 64 @BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread64 @BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 65 65 66 66 ## ========================================================================================================= … … 73 73 74 74 creation-cfa_coroutine$(EXEEXT): 75 ${CC} creation/cfa_cor.c -DBENCH_N=10000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet75 ${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 76 76 77 77 creation-cfa_thread$(EXEEXT): 78 ${CC} creation/cfa_thrd.c -DBENCH_N=10000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet78 ${CC} creation/cfa_thrd.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 79 79 80 80 creation-upp_coroutine$(EXEEXT): 81 u++ creation/upp_cor.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet81 u++ creation/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 82 82 83 83 creation-upp_thread$(EXEEXT): 84 u++ creation/upp_thrd.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet84 u++ creation/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 85 85 86 86 creation-pthread$(EXEEXT): 87 @BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread87 @BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 88 88 89 89 ## ========================================================================================================= … … 97 97 98 98 mutex-function$(EXEEXT): 99 @BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt99 @BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 100 100 101 101 mutex-pthread_lock$(EXEEXT): 102 @BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread102 @BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 103 103 104 104 mutex-upp$(EXEEXT): 105 u++ mutex/upp.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet105 u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 106 106 107 107 mutex-cfa1$(EXEEXT): 108 ${CC} mutex/cfa1.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet108 ${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 109 109 110 110 mutex-cfa2$(EXEEXT): 111 ${CC} mutex/cfa2.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet111 ${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 112 112 113 113 mutex-cfa4$(EXEEXT): 114 ${CC} mutex/cfa4.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet114 ${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 115 115 116 116 ## ========================================================================================================= … … 122 122 123 123 signal-upp$(EXEEXT): 124 u++ schedint/upp.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet124 u++ schedint/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 125 125 126 126 signal-cfa1$(EXEEXT): 127 ${CC} schedint/cfa1.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet127 ${CC} schedint/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 128 128 129 129 signal-cfa2$(EXEEXT): 130 ${CC} schedint/cfa2.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet130 ${CC} schedint/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 131 131 132 132 signal-cfa4$(EXEEXT): 133 ${CC} schedint/cfa4.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet133 ${CC} schedint/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 134 134 135 135 ## ========================================================================================================= … … 141 141 142 142 waitfor-upp$(EXEEXT): 143 u++ schedext/upp.cc -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet143 u++ schedext/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 144 144 145 145 waitfor-cfa1$(EXEEXT): 146 ${CC} schedext/cfa1.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet146 ${CC} schedext/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 147 147 148 148 waitfor-cfa2$(EXEEXT): 149 ${CC} schedext/cfa2.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet149 ${CC} schedext/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 150 150 151 151 waitfor-cfa4$(EXEEXT): 152 ${CC} schedext/cfa4.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet152 ${CC} schedext/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 153 153 154 154 ## ========================================================================================================= 155 sched-int$(EXEEXT):156 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c157 158 monitor$(EXEEXT):159 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c160 155 161 156 %.run : %$(EXEEXT) ${REPEAT} -
src/benchmark/Makefile.in
r9f0b975 r6a5be52 465 465 466 466 ctxswitch-cfa_coroutine$(EXEEXT): 467 ${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet467 ${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 468 468 469 469 ctxswitch-cfa_thread$(EXEEXT): 470 ${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet470 ${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 471 471 472 472 ctxswitch-upp_coroutine$(EXEEXT): 473 u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet473 u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 474 474 475 475 ctxswitch-upp_thread$(EXEEXT): 476 u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet476 u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 477 477 478 478 ctxswitch-pthread$(EXEEXT): 479 @BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread479 @BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 480 480 481 481 creation$(EXEEXT) :\ … … 487 487 488 488 creation-cfa_coroutine$(EXEEXT): 489 ${CC} creation/cfa_cor.c -DBENCH_N=10000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet489 ${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 490 490 491 491 creation-cfa_thread$(EXEEXT): 492 ${CC} creation/cfa_thrd.c -DBENCH_N=10000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet492 ${CC} creation/cfa_thrd.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 493 493 494 494 creation-upp_coroutine$(EXEEXT): 495 u++ creation/upp_cor.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet495 u++ creation/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 496 496 497 497 creation-upp_thread$(EXEEXT): 498 u++ creation/upp_thrd.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet498 u++ creation/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 499 499 500 500 creation-pthread$(EXEEXT): 501 @BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread501 @BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 502 502 503 503 mutex$(EXEEXT) :\ … … 510 510 511 511 mutex-function$(EXEEXT): 512 @BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt512 @BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 513 513 514 514 mutex-pthread_lock$(EXEEXT): 515 @BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -lrt -pthread515 @BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} 516 516 517 517 mutex-upp$(EXEEXT): 518 u++ mutex/upp.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet518 u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 519 519 520 520 mutex-cfa1$(EXEEXT): 521 ${CC} mutex/cfa1.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet521 ${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 522 522 523 523 mutex-cfa2$(EXEEXT): 524 ${CC} mutex/cfa2.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet524 ${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 525 525 526 526 mutex-cfa4$(EXEEXT): 527 ${CC} mutex/cfa4.c -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet527 ${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 528 528 529 529 signal$(EXEEXT) :\ … … 534 534 535 535 signal-upp$(EXEEXT): 536 u++ schedint/upp.cc -DBENCH_N=50000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet536 u++ schedint/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 537 537 538 538 signal-cfa1$(EXEEXT): 539 ${CC} schedint/cfa1.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet539 ${CC} schedint/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 540 540 541 541 signal-cfa2$(EXEEXT): 542 ${CC} schedint/cfa2.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet542 ${CC} schedint/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 543 543 544 544 signal-cfa4$(EXEEXT): 545 ${CC} schedint/cfa4.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet545 ${CC} schedint/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 546 546 547 547 waitfor$(EXEEXT) :\ … … 552 552 553 553 waitfor-upp$(EXEEXT): 554 u++ schedext/upp.cc -DBENCH_N=5000000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} -I. -nodebug -lrt -quiet554 u++ schedext/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} 555 555 556 556 waitfor-cfa1$(EXEEXT): 557 ${CC} schedext/cfa1.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet557 ${CC} schedext/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 558 558 559 559 waitfor-cfa2$(EXEEXT): 560 ${CC} schedext/cfa2.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet560 ${CC} schedext/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 561 561 562 562 waitfor-cfa4$(EXEEXT): 563 ${CC} schedext/cfa4.c -DBENCH_N=500000 ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -I. -nodebug -lrt -quiet 564 565 sched-int$(EXEEXT): 566 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c 567 568 monitor$(EXEEXT): 569 ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c 563 ${CC} schedext/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} 570 564 571 565 %.run : %$(EXEEXT) ${REPEAT} -
src/libcfa/concurrency/kernel.c
r9f0b975 r6a5be52 548 548 549 549 int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->self_cor.name, thrd ); 550 __lib_debug_write( STDERR_FILENO,abort_text, len );550 __lib_debug_write( abort_text, len ); 551 551 552 552 if ( thrd != this_coroutine ) { 553 553 len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine->name, this_coroutine ); 554 __lib_debug_write( STDERR_FILENO,abort_text, len );554 __lib_debug_write( abort_text, len ); 555 555 } 556 556 else { 557 __lib_debug_write( STDERR_FILENO,".\n", 2 );557 __lib_debug_write( ".\n", 2 ); 558 558 } 559 559 } -
src/libcfa/concurrency/monitor.c
r9f0b975 r6a5be52 95 95 else if( this->owner == thrd) { 96 96 // We already have the monitor, just note how many times we took it 97 verify( this->recursion > 0 );98 97 this->recursion += 1; 99 98 … … 207 206 // it means we don't need to do anything 208 207 if( this->recursion != 0) { 208 LIB_DEBUG_PRINT_SAFE("Kernel : recursion still %d\n", this->recursion); 209 209 unlock( &this->lock ); 210 210 return; … … 536 536 short actual_count = aggregate( mon_storage, mask ); 537 537 538 LIB_DEBUG_PRINT_ SAFE("Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max);538 LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max); 539 539 540 540 if(actual_count == 0) return; 541 541 542 LIB_DEBUG_PRINT_ SAFE("Kernel : waitfor internal proceeding\n");542 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : waitfor internal proceeding\n"); 543 543 544 544 // Create storage for monitor context … … 556 556 *mask.accepted = index; 557 557 if( mask.clauses[index].is_dtor ) { 558 LIB_DEBUG_PRINT_ SAFE("Kernel : dtor already there\n");558 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : dtor already there\n"); 559 559 verifyf( mask.clauses[index].size == 1 , "ERROR: Accepted dtor has more than 1 mutex parameter." ); 560 560 … … 568 568 } 569 569 else { 570 LIB_DEBUG_PRINT_ SAFE("Kernel : thread present, baton-passing\n");570 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, baton-passing\n"); 571 571 572 572 // Create the node specific to this wait operation … … 576 576 monitor_save; 577 577 578 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : baton of %d monitors : ", count ); 579 #ifdef __CFA_DEBUG_PRINT__ 580 for( int i = 0; i < count; i++) { 581 LIB_DEBUG_PRINT_BUFFER_LOCAL( "%p %p ", monitors[i], monitors[i]->signal_stack.top ); 582 } 583 #endif 584 LIB_DEBUG_PRINT_BUFFER_LOCAL( "\n"); 585 578 586 // Set the owners to be the next thread 579 587 set_owner( monitors, count, next ); … … 585 593 monitor_restore; 586 594 587 LIB_DEBUG_PRINT_ SAFE("Kernel : thread present, returned\n");595 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, returned\n"); 588 596 } 589 597 590 LIB_DEBUG_PRINT_ SAFE("Kernel : accepted %d\n", *mask.accepted);598 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted); 591 599 592 600 return; … … 596 604 597 605 if( duration == 0 ) { 598 LIB_DEBUG_PRINT_ SAFE("Kernel : non-blocking, exiting\n");606 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : non-blocking, exiting\n"); 599 607 600 608 unlock_all( locks, count ); 601 609 602 LIB_DEBUG_PRINT_ SAFE("Kernel : accepted %d\n", *mask.accepted);610 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted); 603 611 return; 604 612 } … … 607 615 verifyf( duration < 0, "Timeout on waitfor statments not supported yet."); 608 616 609 LIB_DEBUG_PRINT_ SAFE("Kernel : blocking waitfor\n");617 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : blocking waitfor\n"); 610 618 611 619 // Create the node specific to this wait operation … … 629 637 monitor_restore; 630 638 631 LIB_DEBUG_PRINT_ SAFE("Kernel : exiting\n");632 633 LIB_DEBUG_PRINT_ SAFE("Kernel : accepted %d\n", *mask.accepted);639 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : exiting\n"); 640 641 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted); 634 642 } 635 643 … … 648 656 649 657 static inline void set_owner( monitor_desc ** monitors, short count, thread_desc * owner ) { 650 for( int i = 0; i < count; i++ ) { 651 set_owner( monitors[i], owner ); 658 monitors[0]->owner = owner; 659 monitors[0]->recursion = 1; 660 for( int i = 1; i < count; i++ ) { 661 monitors[i]->owner = owner; 662 monitors[i]->recursion = 0; 652 663 } 653 664 } … … 667 678 static inline thread_desc * next_thread( monitor_desc * this ) { 668 679 //Check the signaller stack 680 LIB_DEBUG_PRINT_SAFE("Kernel : mon %p AS-stack top %p\n", this, this->signal_stack.top); 669 681 __condition_criterion_t * urgent = pop( &this->signal_stack ); 670 682 if( urgent ) { … … 718 730 for(int i = 0; i < count; i++) { 719 731 (criteria[i]){ monitors[i], waiter }; 732 LIB_DEBUG_PRINT_SAFE( "Kernel : target %p = %p\n", criteria[i].target, &criteria[i] ); 720 733 push( &criteria[i].target->signal_stack, &criteria[i] ); 721 734 } … … 788 801 } 789 802 790 // LIB_DEBUG_PRINT_SAFE( "Runing %i\n", ready2run);803 LIB_DEBUG_PRINT_SAFE( "Kernel : Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL ); 791 804 return ready2run ? node->waiting_thread : NULL; 792 805 } … … 856 869 short size = 0; 857 870 for( int i = 0; i < mask.size; i++ ) { 871 qsort( mask.clauses[i].list, mask.clauses[i].size ); 858 872 for( int j = 0; j < mask.clauses[i].size; j++) { 859 873 insert_unique( storage, size, mask.clauses[i].list[j] ); 860 874 } 861 875 } 876 // TODO insertion sort instead of this 862 877 qsort( storage, size ); 863 878 return size; -
src/libcfa/concurrency/preemption.c
r9f0b975 r6a5be52 380 380 381 381 if ( sigaction( sig, &act, NULL ) == -1 ) { 382 LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO,382 LIB_DEBUG_PRINT_BUFFER_DECL( 383 383 " __kernel_sigaction( sig:%d, handler:%p, flags:%d ), problem installing signal handler, error(%d) %s.\n", 384 384 sig, handler, flags, errno, strerror( errno ) … … 397 397 398 398 if ( sigaction( sig, &act, NULL ) == -1 ) { 399 LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO,399 LIB_DEBUG_PRINT_BUFFER_DECL( 400 400 " __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n", 401 401 sig, errno, strerror( errno ) -
src/libcfa/interpose.c
r9f0b975 r6a5be52 127 127 va_end( args ); 128 128 129 __lib_debug_write( STDERR_FILENO,abort_text, len );130 __lib_debug_write( STDERR_FILENO,"\n", 1 );129 __lib_debug_write( abort_text, len ); 130 __lib_debug_write( "\n", 1 ); 131 131 } 132 132 133 133 len = snprintf( abort_text, abort_text_size, "Cforall Runtime error (UNIX pid:%ld)\n", (long int)getpid() ); // use UNIX pid (versus getPid) 134 __lib_debug_write( STDERR_FILENO,abort_text, len );134 __lib_debug_write( abort_text, len ); 135 135 136 136 -
src/libcfa/libhdr/libdebug.c
r9f0b975 r6a5be52 9 9 // Author : Thierry Delisle 10 10 // Created On : Thu Mar 30 12:30:01 2017 11 // Last Modified By : 12 // Last Modified On : 11 // Last Modified By : 12 // Last Modified On : 13 13 // Update Count : 0 14 14 // … … 28 28 extern "C" { 29 29 30 void __lib_debug_write( int fd,const char *in_buffer, int len ) {30 void __lib_debug_write( const char *in_buffer, int len ) { 31 31 // ensure all data is written 32 for ( int count = 0, retcode; count < len; count += retcode ) { 32 for ( int count = 0, retcode; count < len; count += retcode ) { 33 33 in_buffer += count; 34 34 35 35 for ( ;; ) { 36 retcode = write( fd, in_buffer, len - count );36 retcode = write( STDERR_FILENO, in_buffer, len - count ); 37 37 38 38 // not a timer interrupt ? 39 if ( retcode != -1 || errno != EINTR ) break; 39 if ( retcode != -1 || errno != EINTR ) break; 40 40 } 41 41 … … 52 52 va_start( args, fmt ); 53 53 __lib_debug_acquire(); 54 54 55 55 int len = vsnprintf( buffer, buffer_size, fmt, args ); 56 __lib_debug_write( STDERR_FILENO,buffer, len );56 __lib_debug_write( buffer, len ); 57 57 58 58 __lib_debug_release(); … … 64 64 65 65 va_start( args, fmt ); 66 66 67 67 int len = vsnprintf( buffer, buffer_size, fmt, args ); 68 __lib_debug_write( STDERR_FILENO,buffer, len );68 __lib_debug_write( buffer, len ); 69 69 70 70 va_end( args ); … … 73 73 void __lib_debug_print_vararg( const char fmt[], va_list args ) { 74 74 int len = vsnprintf( buffer, buffer_size, fmt, args ); 75 __lib_debug_write( STDERR_FILENO,buffer, len );75 __lib_debug_write( buffer, len ); 76 76 } 77 77 … … 80 80 81 81 va_start( args, fmt ); 82 82 83 83 int len = vsnprintf( in_buffer, in_buffer_size, fmt, args ); 84 __lib_debug_write( STDERR_FILENO,in_buffer, len );84 __lib_debug_write( in_buffer, len ); 85 85 86 86 va_end( args ); -
src/libcfa/libhdr/libdebug.h
r9f0b975 r6a5be52 44 44 extern "C" { 45 45 #endif 46 #include <stdarg.h> 46 #include <stdarg.h> 47 #include <stdio.h> 47 48 48 extern void __lib_debug_write( int fd,const char *buffer, int len );49 extern void __lib_debug_write( const char *buffer, int len ); 49 50 extern void __lib_debug_acquire(); 50 51 extern void __lib_debug_release(); … … 58 59 59 60 #ifdef __CFA_DEBUG_PRINT__ 60 #define LIB_DEBUG_WRITE( fd, buffer, len ) __lib_debug_write( fd,buffer, len )61 #define LIB_DEBUG_WRITE( buffer, len ) __lib_debug_write( buffer, len ) 61 62 #define LIB_DEBUG_ACQUIRE() __lib_debug_acquire() 62 63 #define LIB_DEBUG_RELEASE() __lib_debug_release() … … 64 65 #define LIB_DEBUG_PRINT_NOLOCK(...) __lib_debug_print_nolock (__VA_ARGS__) 65 66 #define LIB_DEBUG_PRINT_BUFFER(...) __lib_debug_print_buffer (__VA_ARGS__) 66 #define LIB_DEBUG_PRINT_BUFFER_DECL( fd, ...) char text[256]; int len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text,len );67 #define LIB_DEBUG_PRINT_BUFFER_LOCAL( fd, ...) len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text,len );67 #define LIB_DEBUG_PRINT_BUFFER_DECL(...) char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __lib_debug_write( __dbg_text, __dbg_len ); 68 #define LIB_DEBUG_PRINT_BUFFER_LOCAL(...) __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __lib_debug_write( __dbg_text, __dbg_len ); 68 69 #else 69 70 #define LIB_DEBUG_WRITE(...) ((void)0)
Note: See TracChangeset
for help on using the changeset viewer.