Lines Matching refs:buf
32 char buf[64];
34 snprintf(buf, sizeof(buf), "/proc/%d/stack", tid);
35 int stackFd = open(buf, O_RDONLY);
38 strncat(buf, ":\n", sizeof(buf) - strlen(buf) - 1);
39 write(outFd, buf, strlen(buf));
43 while ((nBytes = read(stackFd, buf, sizeof(buf))) > 0) {
44 write(outFd, buf, nBytes);
56 char buf[128];
74 snprintf(buf, sizeof(buf), "\n----- begin pid %d kernel stacks -----\n", getpid());
75 write(outFd, buf, strlen(buf));
78 snprintf(buf, sizeof(buf), "/proc/%d/task", getpid());
79 taskdir = opendir(buf);
92 snprintf(buf, sizeof(buf), "----- end pid %d kernel stacks -----\n", getpid());
93 write(outFd, buf, strlen(buf));