1 #include "u.h" 2 #include "../port/lib.h" 3 #include "mem.h" 4 #include "dat.h" 5 #include "fns.h" 6 7 static Lock fmtl; 8 9 void _fmtlock(void)10_fmtlock(void) 11 { 12 lock(&fmtl); 13 } 14 15 void _fmtunlock(void)16_fmtunlock(void) 17 { 18 unlock(&fmtl); 19 } 20 21 int _efgfmt(Fmt *)22_efgfmt(Fmt*) 23 { 24 return -1; 25 } 26 27 int mregfmt(Fmt * f)28mregfmt(Fmt* f) 29 { 30 Mreg mreg; 31 32 mreg = va_arg(f->args, Mreg); 33 if(sizeof(Mreg) == sizeof(uvlong)) 34 return fmtprint(f, "%#16.16llux", (uvlong)mreg); 35 return fmtprint(f, "%#8.8ux", (uint)mreg); 36 } 37 38 void fmtinit(void)39fmtinit(void) 40 { 41 quotefmtinstall(); 42 archfmtinstall(); 43 } 44