24 static void stackTraceInit(
void *unused)
29 static void stackTraceLock(
void)
35 static void stackTraceUnlock(
void)
45 rval +=
errlogPrintf(
"[%*p]", (
int)(
sizeof(addr)*2 + 2), addr);
73 if ( ! (buf = malloc(
sizeof(*buf) *
MAXDEPTH))) {
75 errlogPrintf(
"epicsStackTrace(): not enough memory for backtrace\n");
89 for ( i=0; i<n; i++ ) {
91 dumpInfo(buf[i], &sym);
109 static int initflag = 10;
114 if ( 10 == initflag ) {
#define EPICS_STACKTRACE_ADDRESSES
LIBCOM_API int epicsFindAddr(void *addr, epicsSymbol *sym_p)
LIBCOM_API const char *epicsStdCall epicsThreadGetNameSelf(void)
#define epicsMutexMustCreate()
Create an epicsMutex semaphore for use from C code.
void epicsStdCall epicsMutexUnlock(epicsMutexId pmutexNode)
Release the semaphore.
#define EPICS_THREAD_ONCE_INIT
int epicsStackTraceGetFeatures()
APIs for the epicsMutex mutual exclusion semaphore.
LIBCOM_API void epicsStdCall epicsThreadOnce(epicsThreadOnceId *id, EPICSTHREADFUNC, void *arg)
int errlogPrintf(const char *pFormat,...)
void epicsStackTrace(void)
epicsMutexLockStatus epicsStdCall epicsMutexLock(epicsMutexId pmutexNode)
Claim the semaphore, waiting until it's free if currently owned owned by a different thread...
LIBCOM_API int epicsFindAddrGetFeatures()
C++ and C descriptions for a thread.
LIBCOM_API int epicsBackTrace(void **buf, int buf_sz)