Changeset 3d560060 for src/libcfa/bits/debug.c
- Timestamp:
- Nov 30, 2017, 3:05:25 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:
- 557435e, 5da9d6a
- Parents:
- dd9b59e (diff), c2b9f21 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/bits/debug.c
rdd9b59e r3d560060 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // libdebug.c --7 // debug.c -- 8 8 // 9 9 // Author : Thierry Delisle … … 28 28 extern "C" { 29 29 30 void __ lib_debug_write( const char *in_buffer, int len ) {30 void __cfaabi_dbg_bits_write( const char *in_buffer, int len ) { 31 31 // ensure all data is written 32 32 for ( int count = 0, retcode; count < len; count += retcode ) { … … 44 44 } 45 45 46 void __ lib_debug_acquire() __attribute__((__weak__)) {}47 void __ lib_debug_release() __attribute__((__weak__)) {}46 void __cfaabi_dbg_bits_acquire() __attribute__((__weak__)) {} 47 void __cfaabi_dbg_bits_release() __attribute__((__weak__)) {} 48 48 49 void __ lib_debug_print_safe ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {49 void __cfaabi_dbg_bits_print_safe ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) { 50 50 va_list args; 51 51 52 52 va_start( args, fmt ); 53 __ lib_debug_acquire();53 __cfaabi_dbg_bits_acquire(); 54 54 55 55 int len = vsnprintf( buffer, buffer_size, fmt, args ); 56 __ lib_debug_write( buffer, len );56 __cfaabi_dbg_bits_write( buffer, len ); 57 57 58 __ lib_debug_release();58 __cfaabi_dbg_bits_release(); 59 59 va_end( args ); 60 60 } 61 61 62 void __ lib_debug_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {62 void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) { 63 63 va_list args; 64 64 … … 66 66 67 67 int len = vsnprintf( buffer, buffer_size, fmt, args ); 68 __ lib_debug_write( buffer, len );68 __cfaabi_dbg_bits_write( buffer, len ); 69 69 70 70 va_end( args ); 71 71 } 72 72 73 void __ lib_debug_print_vararg( const char fmt[], va_list args ) {73 void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list args ) { 74 74 int len = vsnprintf( buffer, buffer_size, fmt, args ); 75 __ lib_debug_write( buffer, len );75 __cfaabi_dbg_bits_write( buffer, len ); 76 76 } 77 77 78 void __ lib_debug_print_buffer( char in_buffer[], int in_buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) )) {78 void __cfaabi_dbg_bits_print_buffer( char in_buffer[], int in_buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) )) { 79 79 va_list args; 80 80 … … 82 82 83 83 int len = vsnprintf( in_buffer, in_buffer_size, fmt, args ); 84 __ lib_debug_write( in_buffer, len );84 __cfaabi_dbg_bits_write( in_buffer, len ); 85 85 86 86 va_end( args );
Note: See TracChangeset
for help on using the changeset viewer.