diff options
| author | James Morris <james.l.morris@oracle.com> | 2017-07-25 10:44:18 +1000 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2017-07-25 10:44:18 +1000 |
| commit | 53a2ebaaabc1eb8458796fec3bc1e0e80746b642 (patch) | |
| tree | 9d1f9227b49392cdd2edcc01057517da4f4b09c2 /tools/perf/util/util.h | |
| parent | 3cf29931453215536916d0c4da953fce1911ced3 (diff) | |
| parent | 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff) | |
| download | talos-op-linux-53a2ebaaabc1eb8458796fec3bc1e0e80746b642.tar.gz talos-op-linux-53a2ebaaabc1eb8458796fec3bc1e0e80746b642.zip | |
sync to Linus v4.13-rc2 for subsystem developers to work against
Diffstat (limited to 'tools/perf/util/util.h')
| -rw-r--r-- | tools/perf/util/util.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 5dfb9bb6482d..2c9e58a45310 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -1,7 +1,6 @@ #ifndef GIT_COMPAT_UTIL_H #define GIT_COMPAT_UTIL_H -#define _ALL_SOURCE 1 #define _BSD_SOURCE 1 /* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */ #define _DEFAULT_SOURCE 1 @@ -11,24 +10,12 @@ #include <stddef.h> #include <stdlib.h> #include <stdarg.h> +#include <linux/compiler.h> #include <linux/types.h> -#ifdef __GNUC__ -#define NORETURN __attribute__((__noreturn__)) -#else -#define NORETURN -#ifndef __attribute__ -#define __attribute__(x) -#endif -#endif - /* General helper functions */ -void usage(const char *err) NORETURN; -void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); -int error(const char *err, ...) __attribute__((format (printf, 1, 2))); -void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); - -void set_warning_routine(void (*routine)(const char *err, va_list params)); +void usage(const char *err) __noreturn; +void die(const char *err, ...) __noreturn __printf(1, 2); static inline void *zalloc(size_t size) { @@ -57,8 +44,6 @@ int hex2u64(const char *ptr, u64 *val); extern unsigned int page_size; extern int cacheline_size; -bool find_process(const char *name); - int fetch_kernel_version(unsigned int *puint, char *str, size_t str_sz); #define KVER_VERSION(x) (((x) >> 16) & 0xff) |

