summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c636c67)
raw | patch | inline | side by side (parent: c636c67)
author | Vincent Brillault <git@lerya.net> | |
Thu, 21 Aug 2014 16:06:56 +0000 (18:06 +0200) | ||
committer | Vincent Brillault <git@lerya.net> | |
Sat, 28 Feb 2015 06:35:40 +0000 (07:35 +0100) |
src/turbostat.c | patch | blob | history |
diff --git a/src/turbostat.c b/src/turbostat.c
index ad60f3138988c3ea80d12a4827fd01ef03a05658..128950c06af1edce2837336d432a26a297935050 100644 (file)
--- a/src/turbostat.c
+++ b/src/turbostat.c
ERR_NOT_ROOT,
};
-#define __must_check __attribute__((warn_unused_result))
-
static int setup_all_buffers(void);
static int
* skip non-present cpus
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
for_all_cpus(int (func)(struct thread_data *, struct core_data *, struct pkg_data *),
struct thread_data *thread_base, struct core_data *core_base, struct pkg_data *pkg_base)
{
@@ -257,7 +255,7 @@ for_all_cpus(int (func)(struct thread_data *, struct core_data *, struct pkg_dat
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
cpu_migrate(int cpu)
{
CPU_ZERO_S(cpu_affinity_setsize, cpu_affinity_set);
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
get_msr(int cpu, off_t offset, unsigned long long *msr)
{
ssize_t retval;
/*
* old = new - old
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
delta_thread(struct thread_data *new, struct thread_data *old,
struct core_data *core_delta)
{
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
delta_cpu(struct thread_data *t, struct core_data *c,
struct pkg_data *p, struct thread_data *t2,
struct core_data *c2, struct pkg_data *p2)
* migrate to cpu
* acquire and record local counters for that cpu
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
get_counters(struct thread_data *t, struct core_data *c, struct pkg_data *p)
{
int cpu = t->cpu_id;
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
for_all_cpus_2(int (func)(struct thread_data *, struct core_data *,
struct pkg_data *, struct thread_data *, struct core_data *,
struct pkg_data *), struct thread_data *thread_base,
* run func(cpu) on every cpu in /proc/stat
* return max_cpu number
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
for_all_proc_cpus(int (func)(int))
{
FILE *fp;
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
check_dev_msr()
{
struct stat sb;
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
check_super_user()
{
if (getuid() != 0) {
* below this value, including the Digital Thermal Sensor (DTS),
* Package Thermal Management Sensor (PTM), and thermal event thresholds.
*/
-static int __must_check
+static int __attribute__((warn_unused_result))
set_temperature_target(struct thread_data *t, struct core_data *c, struct pkg_data *p)
{
unsigned long long msr;
return 0;
}
-static int __must_check
+static int __attribute__((warn_unused_result))
check_cpuid()
{
unsigned int eax, ebx, ecx, edx, max_level;
-static int __must_check
+static int __attribute__((warn_unused_result))
topology_probe()
{
int i;