10 #include <sys/syscall.h>
12 static inline pid_t
sys_getpid(void)
14 return syscall(SYS_getpid
);
17 static inline pid_t
sys_gettid(void)
19 return syscall(SYS_gettid
);
22 static inline bool streq(const char *s1
, const char *s2
)
24 return strcmp(s1
, s2
) == 0;
27 static unsigned long long xstrtoull(const char *p
, char **end
)
32 } else if ('1' <= *p
&& *p
<= '9') {
33 unsigned long long val
;
36 val
= strtoull(p
, end
, 10);
43 static struct dirent
*xreaddir(DIR *d
)
49 assert(de
|| errno
== 0);