Changes in / [ffd0ac2:5a73f0f]
- Files:
-
- 1 deleted
- 12 edited
-
Jenkinsfile (modified) (2 diffs)
-
src/benchmark/Makefile.am (modified) (1 diff)
-
src/benchmark/Makefile.in (modified) (1 diff)
-
src/driver/cfa.cc (modified) (1 diff)
-
src/libcfa/bits/locks.h (modified) (4 diffs)
-
src/libcfa/bits/signal.h (deleted)
-
src/libcfa/concurrency/invoke.h (modified) (1 diff)
-
src/libcfa/concurrency/kernel.c (modified) (7 diffs)
-
src/libcfa/concurrency/kernel_private.h (modified) (1 diff)
-
src/libcfa/concurrency/monitor.c (modified) (10 diffs)
-
src/libcfa/concurrency/preemption.c (modified) (8 diffs)
-
src/libcfa/concurrency/thread.c (modified) (2 diffs)
-
src/libcfa/interpose.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
rffd0ac2 r5a73f0f 174 174 175 175 def notify_server(int wait) { 176 sh """curl -- data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true"""176 sh """curl --silent --data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true""" 177 177 return 178 178 } … … 324 324 325 325 //Then publish the results 326 sh 'curl -H \'Content-Type: application/json\'--data @bench.json http://plg2:8082/jenkins/publish > /dev/null || true'326 sh 'curl -H "Content-Type: application/json" --silent --data @bench.json http://plg2:8082/jenkins/publish > /dev/null || true' 327 327 } 328 328 } -
src/benchmark/Makefile.am
rffd0ac2 r5a73f0f 59 59 @echo -e '\t"githash": "'${githash}'",' 60 60 @echo -e '\t"arch": "' ${arch} '",' 61 @echo -e '\t"compile": {'62 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'63 @echo -e '\t\t"dummy" : {}'64 @echo -e '\t},'65 61 @echo -e '\t"ctxswitch": {' 66 62 @echo -en '\t\t"coroutine":' -
src/benchmark/Makefile.in
rffd0ac2 r5a73f0f 473 473 @echo -e '\t"githash": "'${githash}'",' 474 474 @echo -e '\t"arch": "' ${arch} '",' 475 @echo -e '\t"compile": {'476 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'477 @echo -e '\t\t"dummy" : {}'478 @echo -e '\t},'479 475 @echo -e '\t"ctxswitch": {' 480 476 @echo -en '\t\t"coroutine":' -
src/driver/cfa.cc
rffd0ac2 r5a73f0f 277 277 args[nargs] = "--undefined=__cfaabi_dbg_bits_write"; 278 278 nargs += 1; 279 args[nargs] = "-Xlinker";280 nargs += 1;281 args[nargs] = "--undefined=__cfaabi_interpose_startup";282 nargs += 1;283 279 284 280 } // if -
src/libcfa/bits/locks.h
rffd0ac2 r5a73f0f 58 58 59 59 #ifdef __cforall 60 extern "C" {61 extern void disable_interrupts();62 extern void enable_interrupts_noPoll();63 }64 65 60 extern void yield( unsigned int ); 66 61 extern thread_local struct thread_desc * volatile this_thread; 67 extern thread_local struct processor * volatile this_processor;68 62 69 63 static inline void ?{}( __spinlock_t & this ) { … … 74 68 static inline _Bool try_lock ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 75 69 _Bool result = __lock_test_and_test_and_set( this.lock ); 76 if( result ) { 77 disable_interrupts(); 78 __cfaabi_dbg_debug_do( 70 __cfaabi_dbg_debug_do( 71 if( result ) { 79 72 this.prev_name = caller; 80 73 this.prev_thrd = this_thread; 81 )82 }74 } 75 ) 83 76 return result; 84 77 } … … 106 99 #endif 107 100 } 108 disable_interrupts();109 101 __cfaabi_dbg_debug_do( 110 102 this.prev_name = caller; … … 113 105 } 114 106 115 // // Lock the spinlock, yield if already acquired 116 // static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 117 // for ( unsigned int i = 1;; i += 1 ) { 118 // if ( __lock_test_and_test_and_set( this.lock ) ) break; 119 // yield( i ); 120 // } 121 // disable_interrupts(); 122 // __cfaabi_dbg_debug_do( 123 // this.prev_name = caller; 124 // this.prev_thrd = this_thread; 125 // ) 126 // } 107 // Lock the spinlock, spin if already acquired 108 static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 109 for ( unsigned int i = 1;; i += 1 ) { 110 if ( __lock_test_and_test_and_set( this.lock ) ) break; 111 yield( i ); 112 } 113 __cfaabi_dbg_debug_do( 114 this.prev_name = caller; 115 this.prev_thrd = this_thread; 116 ) 117 } 127 118 128 119 static inline void unlock( __spinlock_t & this ) { 129 enable_interrupts_noPoll();130 120 __lock_release( this.lock ); 131 121 } -
src/libcfa/concurrency/invoke.h
rffd0ac2 r5a73f0f 134 134 // instrusive link field for threads 135 135 struct thread_desc * next; 136 137 __cfaabi_dbg_debug_do(138 // instrusive link field for debugging139 struct thread_desc * dbg_next;140 struct thread_desc * dbg_prev;141 )142 136 }; 143 137 -
src/libcfa/concurrency/kernel.c
rffd0ac2 r5a73f0f 242 242 void finishRunning(processor * this) { 243 243 if( this->finish.action_code == Release ) { 244 verify( disable_preempt_count > 1 );245 244 unlock( *this->finish.lock ); 246 245 } … … 249 248 } 250 249 else if( this->finish.action_code == Release_Schedule ) { 251 verify( disable_preempt_count > 1 );252 250 unlock( *this->finish.lock ); 253 251 ScheduleThread( this->finish.thrd ); 254 252 } 255 253 else if( this->finish.action_code == Release_Multi ) { 256 verify( disable_preempt_count > this->finish.lock_count );257 254 for(int i = 0; i < this->finish.lock_count; i++) { 258 255 unlock( *this->finish.locks[i] ); … … 260 257 } 261 258 else if( this->finish.action_code == Release_Multi_Schedule ) { 262 verify( disable_preempt_count > this->finish.lock_count );263 259 for(int i = 0; i < this->finish.lock_count; i++) { 264 260 unlock( *this->finish.locks[i] ); … … 367 363 this_processor->finish.lock = lock; 368 364 369 verify( disable_preempt_count > 1);365 verify( disable_preempt_count > 0 ); 370 366 suspend(); 371 367 verify( disable_preempt_count > 0 ); … … 395 391 this_processor->finish.thrd = thrd; 396 392 397 verify( disable_preempt_count > 1);393 verify( disable_preempt_count > 0 ); 398 394 suspend(); 399 395 verify( disable_preempt_count > 0 ); … … 519 515 __cfaabi_dbg_print_safe("Kernel : Shutdown complete\n"); 520 516 } 521 522 //=============================================================================================523 // Unexpected Terminating logic524 //=============================================================================================525 526 517 527 518 static __spinlock_t kernel_abort_lock; … … 620 611 } 621 612 622 //-----------------------------------------------------------------------------623 // Debug624 __cfaabi_dbg_debug_do(625 struct {626 thread_desc * tail;627 } __cfaabi_dbg_thread_list = { NULL };628 629 void __cfaabi_dbg_thread_register( thread_desc * thrd ) {630 if( !__cfaabi_dbg_thread_list.tail ) {631 __cfaabi_dbg_thread_list.tail = thrd;632 return;633 }634 __cfaabi_dbg_thread_list.tail->dbg_next = thrd;635 thrd->dbg_prev = __cfaabi_dbg_thread_list.tail;636 __cfaabi_dbg_thread_list.tail = thrd;637 }638 639 void __cfaabi_dbg_thread_unregister( thread_desc * thrd ) {640 thread_desc * prev = thrd->dbg_prev;641 thread_desc * next = thrd->dbg_next;642 643 if( next ) { next->dbg_prev = prev; }644 else {645 assert( __cfaabi_dbg_thread_list.tail == thrd );646 __cfaabi_dbg_thread_list.tail = prev;647 }648 649 if( prev ) { prev->dbg_next = next; }650 651 thrd->dbg_prev = NULL;652 thrd->dbg_next = NULL;653 }654 )655 613 // Local Variables: // 656 614 // mode: c // -
src/libcfa/concurrency/kernel_private.h
rffd0ac2 r5a73f0f 85 85 extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst); 86 86 87 __cfaabi_dbg_debug_do(88 extern void __cfaabi_dbg_thread_register ( thread_desc * thrd );89 extern void __cfaabi_dbg_thread_unregister( thread_desc * thrd );90 )91 92 87 //----------------------------------------------------------------------------- 93 88 // Utils -
src/libcfa/concurrency/monitor.c
rffd0ac2 r5a73f0f 53 53 static inline __lock_size_t aggregate ( monitor_desc * storage [], const __waitfor_mask_t & mask ); 54 54 55 #ifndef __CFA_LOCK_NO_YIELD 56 #define DO_LOCK lock_yield 57 #else 58 #define DO_LOCK lock 59 #endif 60 55 61 //----------------------------------------------------------------------------- 56 62 // Useful defines … … 84 90 static void __enter_monitor_desc( monitor_desc * this, const __monitor_group_t & group ) { 85 91 // Lock the monitor spinlock 86 lock( this->lock __cfaabi_dbg_ctx2 );92 DO_LOCK( this->lock __cfaabi_dbg_ctx2 ); 87 93 thread_desc * thrd = this_thread; 88 89 verify( disable_preempt_count > 0 );90 94 91 95 __cfaabi_dbg_print_safe("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner); … … 117 121 // Some one else has the monitor, wait in line for it 118 122 append( this->entry_queue, thrd ); 119 120 verify( disable_preempt_count > 0 );121 122 123 BlockInternal( &this->lock ); 123 124 … … 137 138 static void __enter_monitor_dtor( monitor_desc * this, fptr_t func ) { 138 139 // Lock the monitor spinlock 139 lock( this->lock __cfaabi_dbg_ctx2 );140 DO_LOCK( this->lock __cfaabi_dbg_ctx2 ); 140 141 thread_desc * thrd = this_thread; 141 142 … … 200 201 // Leave single monitor 201 202 void __leave_monitor_desc( monitor_desc * this ) { 202 // Lock the monitor spinlock 203 lock( this->lock __cfaabi_dbg_ctx2 );203 // Lock the monitor spinlock, DO_LOCK to reduce contention 204 DO_LOCK( this->lock __cfaabi_dbg_ctx2 ); 204 205 205 206 __cfaabi_dbg_print_safe("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner); … … 247 248 248 249 // Lock the monitor now 249 lock( this->lock __cfaabi_dbg_ctx2 );250 DO_LOCK( this->lock __cfaabi_dbg_ctx2 ); 250 251 251 252 disable_interrupts(); … … 396 397 append( this.blocked, &waiter ); 397 398 398 verify( disable_preempt_count == 0 );399 400 399 // Lock all monitors (aggregates the locks as well) 401 400 lock_all( monitors, locks, count ); 402 403 // verifyf( disable_preempt_count == count, "Got %d, expected %d\n", disable_preempt_count, count );404 if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); }405 401 406 402 // Find the next thread(s) to run … … 477 473 monitor_ctx( this.monitors, this.monitor_count ); 478 474 479 verify( disable_preempt_count == 0 );480 481 475 // Lock all monitors (aggregates the locks them as well) 482 476 lock_all( monitors, locks, count ); 483 484 // verify( disable_preempt_count == count );485 if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); }486 487 477 488 478 // Create the node specific to this wait operation … … 747 737 static inline void lock_all( __spinlock_t * locks [], __lock_size_t count ) { 748 738 for( __lock_size_t i = 0; i < count; i++ ) { 749 lock( *locks[i] __cfaabi_dbg_ctx2 );739 DO_LOCK( *locks[i] __cfaabi_dbg_ctx2 ); 750 740 } 751 741 } … … 754 744 for( __lock_size_t i = 0; i < count; i++ ) { 755 745 __spinlock_t * l = &source[i]->lock; 756 lock( *l __cfaabi_dbg_ctx2 );746 DO_LOCK( *l __cfaabi_dbg_ctx2 ); 757 747 if(locks) locks[i] = l; 758 748 } -
src/libcfa/concurrency/preemption.c
rffd0ac2 r5a73f0f 19 19 extern "C" { 20 20 #include <errno.h> 21 #include <execinfo.h> 22 #define __USE_GNU 23 #include <signal.h> 24 #undef __USE_GNU 21 25 #include <stdio.h> 22 26 #include <string.h> … … 25 29 #undef ftype 26 30 27 #include "bits/signal.h" 31 #ifdef __USE_STREAM__ 32 #include "fstream" 33 #endif 28 34 29 35 //TODO move to defaults … … 34 40 return __CFA_DEFAULT_PREEMPTION__; 35 41 } 42 43 // Short hands for signal context information 44 #define __CFA_SIGCXT__ ucontext_t * 45 #define __CFA_SIGPARMS__ __attribute__((unused)) int sig, __attribute__((unused)) siginfo_t *sfp, __attribute__((unused)) __CFA_SIGCXT__ cxt 36 46 37 47 // FwdDeclarations : timeout handlers … … 43 53 void sigHandler_segv ( __CFA_SIGPARMS__ ); 44 54 void sigHandler_abort ( __CFA_SIGPARMS__ ); 55 56 // FwdDeclarations : sigaction wrapper 57 static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags ); 45 58 46 59 // FwdDeclarations : alarm thread main … … 169 182 void enable_interrupts_noPoll() { 170 183 __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &disable_preempt_count, -1, __ATOMIC_SEQ_CST ); 171 verify f( prev != 0u, "Incremented from %u\n", prev); // If this triggers someone is enabled already enabled interrupts184 verify( prev != 0u ); // If this triggers someone is enabled already enabled interrupts 172 185 } 173 186 } … … 233 246 // Setup proper signal handlers 234 247 __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART ); // CtxSwitch handler 248 // __kernel_sigaction( SIGSEGV, sigHandler_segv , SA_SIGINFO ); // Failure handler 249 // __kernel_sigaction( SIGBUS , sigHandler_segv , SA_SIGINFO ); // Failure handler 235 250 236 251 signal_block( SIGALRM ); … … 293 308 if( !preemption_ready() ) { return; } 294 309 295 __cfaabi_dbg_print_buffer_decl(" KERNEL: preempting core %p (%p).\n", this_processor, this_thread);310 // __cfaabi_dbg_print_buffer_decl(" KERNEL: preempting core %p (%p).\n", this_processor, this_thread); 296 311 297 312 preemption_in_progress = true; // Sync flag : prevent recursive calls to the signal handler … … 365 380 } 366 381 382 // Sigaction wrapper : register an signal handler 383 static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags ) { 384 struct sigaction act; 385 386 act.sa_sigaction = (void (*)(int, siginfo_t *, void *))handler; 387 act.sa_flags = flags; 388 389 if ( sigaction( sig, &act, NULL ) == -1 ) { 390 __cfaabi_dbg_print_buffer_decl( 391 " __kernel_sigaction( sig:%d, handler:%p, flags:%d ), problem installing signal handler, error(%d) %s.\n", 392 sig, handler, flags, errno, strerror( errno ) 393 ); 394 _exit( EXIT_FAILURE ); 395 } 396 } 397 398 // Sigaction wrapper : restore default handler 399 static void __kernel_sigdefault( int sig ) { 400 struct sigaction act; 401 402 act.sa_handler = SIG_DFL; 403 act.sa_flags = 0; 404 sigemptyset( &act.sa_mask ); 405 406 if ( sigaction( sig, &act, NULL ) == -1 ) { 407 __cfaabi_dbg_print_buffer_decl( 408 " __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n", 409 sig, errno, strerror( errno ) 410 ); 411 _exit( EXIT_FAILURE ); 412 } 413 } 414 415 //============================================================================================= 416 // Terminating Signals logic 417 //============================================================================================= 418 419 __cfaabi_dbg_debug_do( 420 static void __kernel_backtrace( int start ) { 421 // skip first N stack frames 422 423 enum { Frames = 50 }; 424 void * array[Frames]; 425 int size = backtrace( array, Frames ); 426 char ** messages = backtrace_symbols( array, size ); 427 428 // find executable name 429 *index( messages[0], '(' ) = '\0'; 430 #ifdef __USE_STREAM__ 431 serr | "Stack back trace for:" | messages[0] | endl; 432 #else 433 fprintf( stderr, "Stack back trace for: %s\n", messages[0]); 434 #endif 435 436 // skip last 2 stack frames after main 437 for ( int i = start; i < size && messages != NULL; i += 1 ) { 438 char * name = NULL; 439 char * offset_begin = NULL; 440 char * offset_end = NULL; 441 442 for ( char *p = messages[i]; *p; ++p ) { 443 // find parantheses and +offset 444 if ( *p == '(' ) { 445 name = p; 446 } 447 else if ( *p == '+' ) { 448 offset_begin = p; 449 } 450 else if ( *p == ')' ) { 451 offset_end = p; 452 break; 453 } 454 } 455 456 // if line contains symbol print it 457 int frameNo = i - start; 458 if ( name && offset_begin && offset_end && name < offset_begin ) { 459 // delimit strings 460 *name++ = '\0'; 461 *offset_begin++ = '\0'; 462 *offset_end++ = '\0'; 463 464 #ifdef __USE_STREAM__ 465 serr | "(" | frameNo | ")" | messages[i] | ":" 466 | name | "+" | offset_begin | offset_end | endl; 467 #else 468 fprintf( stderr, "(%i) %s : %s + %s %s\n", frameNo, messages[i], name, offset_begin, offset_end); 469 #endif 470 } 471 // otherwise, print the whole line 472 else { 473 #ifdef __USE_STREAM__ 474 serr | "(" | frameNo | ")" | messages[i] | endl; 475 #else 476 fprintf( stderr, "(%i) %s\n", frameNo, messages[i] ); 477 #endif 478 } 479 } 480 481 free( messages ); 482 } 483 ) 484 485 // void sigHandler_segv( __CFA_SIGPARMS__ ) { 486 // __cfaabi_dbg_debug_do( 487 // #ifdef __USE_STREAM__ 488 // serr | "*CFA runtime error* program cfa-cpp terminated with" 489 // | (sig == SIGSEGV ? "segment fault." : "bus error.") 490 // | endl; 491 // #else 492 // fprintf( stderr, "*CFA runtime error* program cfa-cpp terminated with %s\n", sig == SIGSEGV ? "segment fault." : "bus error." ); 493 // #endif 494 495 // // skip first 2 stack frames 496 // __kernel_backtrace( 1 ); 497 // ) 498 // exit( EXIT_FAILURE ); 499 // } 500 501 // void sigHandler_abort( __CFA_SIGPARMS__ ) { 502 // // skip first 6 stack frames 503 // __cfaabi_dbg_debug_do( __kernel_backtrace( 6 ); ) 504 505 // // reset default signal handler 506 // __kernel_sigdefault( SIGABRT ); 507 508 // raise( SIGABRT ); 509 // } 510 367 511 // Local Variables: // 368 512 // mode: c // -
src/libcfa/concurrency/thread.c
rffd0ac2 r5a73f0f 33 33 void ?{}(thread_desc& this) { 34 34 (this.self_cor){}; 35 this.self_cor.name = "Anonymous Thread";35 this.self_cor.name = "Anonymous Coroutine"; 36 36 this.self_mon.owner = &this; 37 37 this.self_mon.recursion = 1; 38 38 this.self_mon_p = &this.self_mon; 39 39 this.next = NULL; 40 __cfaabi_dbg_debug_do(41 this.dbg_next = NULL;42 this.dbg_prev = NULL;43 __cfaabi_dbg_thread_register(&this);44 )45 40 46 41 (this.monitors){ &this.self_mon_p, 1, (fptr_t)0 }; … … 48 43 49 44 void ^?{}(thread_desc& this) { 50 __cfaabi_dbg_debug_do(51 __cfaabi_dbg_thread_unregister(&this);52 )53 45 ^(this.self_cor){}; 54 46 } -
src/libcfa/interpose.c
rffd0ac2 r5a73f0f 22 22 #include <dlfcn.h> 23 23 #include <unistd.h> 24 #define __USE_GNU25 #include <signal.h>26 #undef __USE_GNU27 #include <execinfo.h>28 24 } 29 25 30 26 #include "bits/debug.h" 31 27 #include "bits/defs.h" 32 #include "bits/signal.h"33 28 #include "startup.h" 34 29 35 void __cfaabi_interpose_startup(void) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) ));30 void interpose_startup(void) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) )); 36 31 37 32 typedef void (*generic_fptr_t)(void); … … 89 84 #define INIT_REALRTN( x, ver ) assign_ptr( (void**)&libc_##x, #x, ver) 90 85 91 void sigHandler_segv ( __CFA_SIGPARMS__ ); 92 void sigHandler_abort( __CFA_SIGPARMS__ ); 93 94 void __cfaabi_interpose_startup() { 86 void interpose_startup() { 95 87 const char *version = NULL; 96 88 97 89 INIT_REALRTN( abort, version ); 98 90 INIT_REALRTN( exit, version ); 99 100 __kernel_sigaction( SIGSEGV, sigHandler_segv , SA_SIGINFO ); // Failure handler101 __kernel_sigaction( SIGBUS , sigHandler_segv , SA_SIGINFO ); // Failure handler102 __kernel_sigaction( SIGABRT, sigHandler_abort, SA_SIGINFO ); // Failure handler103 91 } 104 105 //=============================================================================================106 // Terminating Signals logic107 //=============================================================================================108 92 109 93 extern "C" { … … 155 139 } 156 140 157 // skip first 6 stack frames by default158 static void __kernel_backtrace() {159 // skip first N stack frames160 int start = 6;161 162 enum { Frames = 50 };163 void * array[Frames];164 int size = backtrace( array, Frames );165 char ** messages = backtrace_symbols( array, size );166 167 // find executable name168 *index( messages[0], '(' ) = '\0';169 __cfaabi_dbg_bits_print_nolock( "Stack back trace for: %s\n", messages[0]);170 171 // skip last 2 stack frames after main172 for ( int i = start; i < size && messages != NULL; i += 1 ) {173 char * name = NULL;174 char * offset_begin = NULL;175 char * offset_end = NULL;176 177 for ( char *p = messages[i]; *p; ++p ) {178 // find parantheses and +offset179 if ( *p == '(' ) {180 name = p;181 }182 else if ( *p == '+' ) {183 offset_begin = p;184 }185 else if ( *p == ')' ) {186 offset_end = p;187 break;188 }189 }190 191 // if line contains symbol print it192 int frameNo = i - start;193 if ( name && offset_begin && offset_end && name < offset_begin ) {194 // delimit strings195 *name++ = '\0';196 *offset_begin++ = '\0';197 *offset_end++ = '\0';198 199 __cfaabi_dbg_bits_print_nolock( "(%i) %s : %s + %s %s\n", frameNo, messages[i], name, offset_begin, offset_end);200 }201 // otherwise, print the whole line202 else {203 __cfaabi_dbg_bits_print_nolock( "(%i) %s\n", frameNo, messages[i] );204 }205 }206 207 free( messages );208 }209 210 void sigHandler_segv( __CFA_SIGPARMS__ ) {211 // skip first only 1 stack frames in case of segfault.212 abortf( "*CFA runtime error* program cfa-cpp terminated with %s\n", sig == SIGSEGV ? "segment fault." : "bus error." );213 }214 215 void sigHandler_abort( __CFA_SIGPARMS__ ) {216 __kernel_backtrace();217 218 // reset default signal handler219 __kernel_sigdefault( SIGABRT );220 221 raise( SIGABRT );222 }223 224 141 // Local Variables: // 225 142 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.