4 #include "threadimpl.h"
9 _threaddebug(ulong flag, char *fmt, ...)
16 if((_threaddebuglevel&flag) == 0)
19 fmtfdinit(&f, 2, buf, sizeof buf);
23 fmtprint(&f, "noproc ");
25 fmtprint(&f, "%d.%d ", p->pid, p->thread->id);
27 fmtprint(&f, "%d._ ", p->pid);
30 fmtvprint(&f, fmt, arg);
37 _threadassert(char *s)
45 n = sprint(buf, "%d.%d ", p->pid, p->thread->id);
48 snprint(buf+n, sizeof(buf)-n, "%s: assertion failed\n", s);
49 write(2, buf, strlen(buf));