Changeset 11686 for trunk/psLib/src/sys
- Timestamp:
- Feb 7, 2007, 1:52:54 PM (20 years ago)
- Location:
- trunk/psLib/src/sys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psAbort.c
r10999 r11686 9 9 * 10 10 * @author Eric Van Alst, MHPCC 11 * @author Joshua Hoblitt, University of Hawaii 11 12 * 12 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2007-0 1-09 22:38:53$13 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-02-07 23:52:54 $ 14 15 * 15 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 23 #include <stdarg.h> 23 24 #include <stdlib.h> 25 24 26 #include "psAbort.h" 25 27 #include "psError.h" 26 28 #include "psLogMsg.h" 27 29 28 void psAbort(const char *name, const char *format, ...) 30 void p_psAbort(const char *file, 31 unsigned int lineno, 32 const char *func, 33 const char *format, 34 ...) 29 35 { 30 36 psErrorStackPrint(stderr, "Aborting. Error stack:"); … … 35 41 36 42 // Call logging function with PS_LOG_ABORT level 37 psLogMsgV( name, PS_LOG_ABORT, format, argPtr);43 psLogMsgV("psLib.sys", PS_LOG_ABORT, format, argPtr); 38 44 39 45 // Clean up stack after variable arguement has been used -
trunk/psLib/src/sys/psAbort.h
r11248 r11686 8 8 * 9 9 * @author Eric Van Alst, MHPCC 10 * @author Joshua Hoblitt, University of Hawaii 10 11 * 11 * $Revision: 1.1 3$ $Name: not supported by cvs2svn $12 * $Date: 2007-0 1-23 22:47:23$12 * $Revision: 1.14 $ $Name: not supported by cvs2svn $ 13 * $Date: 2007-02-07 23:52:54 $ 13 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 14 15 */ … … 19 20 /// @addtogroup SysUtils System Utilities 20 21 /// @{ 22 23 #include <stdarg.h> 21 24 22 25 /** Reports an abort message to logging facility … … 30 33 * 31 34 */ 32 #ifdef __GNUC__35 #ifdef DOXYGEN 33 36 void psAbort( 34 const char *name, ///< Source of abort such as file or function detected 35 const char *format, ///< A printf style formatting statement defining msg 36 ... 37 ) __attribute__((format(printf, 2, 3))); 38 #else // __GNUC__ 39 void psAbort( 40 const char *name, ///< Source of abort such as file or function detected 41 const char *format, ///< A printf style formatting statement defining msg 37 const char *format, ///< A printf style formatting statement 42 38 ... 43 39 ); 44 #endif // __GNUC__ 40 #else // ifdef DOXYGEN 41 void p_psAbort( 42 const char *file, ///< File of caller 43 unsigned int lineno, ///< Line number of caller 44 const char *func, ///< Function name of caller 45 const char *format, ///< A printf style formatting statement 46 ... 47 #ifdef __GNUC__ 48 ) __attribute__((format(printf, 4, 5), noreturn)); 49 #else // ifdef __GNUC__ 50 ); 51 #endif // ifdef __GNUC__ 52 #ifndef SWIG 53 #define psAbort(...) \ 54 p_psAbort(__FILE__, __LINE__, __func__, __VA_ARGS__) 55 #endif // iddef SWIG 56 #endif // ifdef DOXYGEN 45 57 46 58 /// @} -
trunk/psLib/src/sys/psError.c
r11674 r11686 11 11 * @author Eric Van Alst, MHPCC 12 12 * 13 * @version $Revision: 1.4 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2007-02-07 01:15:49$13 * @version $Revision: 1.45 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-02-07 23:52:54 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 65 65 psArrayAdd(errorStack, 0, err); 66 66 } else { 67 psAbort( __func__,"attempt to exceed maximum error stack depth of %ld",67 psAbort("attempt to exceed maximum error stack depth of %ld", 68 68 (long)MAX_ERROR_STACK_SIZE); 69 69 } … … 78 78 // thread exits 79 79 if (pthread_key_create(&errorStack_key, psFreeWrapper)) { 80 psAbort( __func__, "pthread_key_create() failed");80 psAbort("pthread_key_create failed()"); 81 81 } 82 82 errorStackKeyInitialized = true; … … 95 95 // param 96 96 if (pthread_setspecific(errorStack_key, errorStack)) { 97 psAbort( __func__,"pthread_setspecific() failed");97 psAbort("pthread_setspecific() failed"); 98 98 } 99 99 } -
trunk/psLib/src/sys/psString.c
r11618 r11686 13 13 * @author David Robbins, MHPCC 14 14 * 15 * @version $Revision: 1.5 0$ $Name: not supported by cvs2svn $16 * @date $Date: 2007-02-0 3 06:01:42$15 * @version $Revision: 1.51 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2007-02-07 23:52:54 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 339 339 } 340 340 341 psAbort( __func__,"Should never get here.\n");341 psAbort("Should never get here.\n"); 342 342 return 0; 343 343 }
Note:
See TracChangeset
for help on using the changeset viewer.
