aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/perf_counter/util.h')
-rw-r--r--Documentation/perf_counter/util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/perf_counter/util.h b/Documentation/perf_counter/util.h
index 13f8bdce7600..36e40c38e093 100644
--- a/Documentation/perf_counter/util.h
+++ b/Documentation/perf_counter/util.h
@@ -295,6 +295,20 @@ static inline char *gitstrchrnul(const char *s, int c)
295} 295}
296#endif 296#endif
297 297
298/*
299 * Wrappers:
300 */
301extern char *xstrdup(const char *str);
302extern void *xmalloc(size_t size);
303extern void *xmemdupz(const void *data, size_t len);
304extern char *xstrndup(const char *str, size_t len);
305extern void *xrealloc(void *ptr, size_t size);
306extern void *xcalloc(size_t nmemb, size_t size);
307extern void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
308extern ssize_t xread(int fd, void *buf, size_t len);
309extern ssize_t xwrite(int fd, const void *buf, size_t len);
310extern int xdup(int fd);
311extern FILE *xfdopen(int fd, const char *mode);
298static inline size_t xsize_t(off_t len) 312static inline size_t xsize_t(off_t len)
299{ 313{
300 return (size_t)len; 314 return (size_t)len;