#include <execinfo.h>
#include <senf/config.hh>
#include <stdint.h>
+#include <stdio.h>
//#include "FIFORunner.mpp"
#define prefix_
'a', 'b', 'c', 'd', 'e', 'f' };
static void * entries[SENF_DEBUG_BACKTRACE_NUMCALLERS];
- write(1, "\n\n*** Scheduler task hanging: ", 30);
+ write(1, "\n\n*** Scheduler task hanging (pid ",34);
+ static char pid[7];
+ ::snprintf(pid, 7, "%6d", ::getpid());
+ pid[6] = 0;
+ write(1, pid, 6);
+ write(1, "): ", 3);
write(1, runningName_.c_str(), runningName_.size());
write(1, " at\n ", 3);
for (unsigned i (0); i < nEntries; ++i) {
write(1, " 0x", 3);
for (unsigned j (sizeof(void*)); j > 0; --j) {
- ::uintptr_t v( ::uintptr_t (entries[i])>>(8*(j-1)));
+ uintptr_t v ( reinterpret_cast<uintptr_t>(entries[i]) >> (8*(j-1)) );
write(1, &(hex[ (v >> 4) & 0x0f ]), 1);
write(1, &(hex[ (v ) & 0x0f ]), 1);
}