5 static uvlong order = 0x0001020304050607ULL;
8 be2vlong(vlong *to, uchar *f)
15 for(i = 0; i < sizeof order; i++)
33 * Threaded programs may have multiple procs
34 * with different fd tables, so we may need to open
35 * /dev/bintime on a per-pid basis
38 /* First, look if we've opened it for this particular pid */
42 for(i = 0; i < nelem(fds); i++)
43 if(fds[i].pid == pid){
49 /* If it's not open for this pid, try the global pid */
54 if((f = open("/dev/bintime", OREAD|OCEXEC)) < 0)
57 for(i = 0; i < nelem(fds); i++)
58 if(fds[i].pid == pid || fds[i].pid == 0){
65 if(pread(f, b, sizeof b, 0) == sizeof b){
72 }while(tries++ == 0); /* retry once */