|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] [Beginners question]- Compilation error while trying user program from domU
Hello I'm having almost the same problem as below.In my case, i want to use "cpufreq.h" and percpu.h libraries to get current processor frequency.
**This is my sample program**
#include <acpi/cpufreq/cpufreq.h>
#include <asm/percpu.h>
static unsigned int get_my_cur_freq(int cpuid)
{
struct cpufreq_policy *policy;
policy = per_cpu(cpufreq_cpu_policy, cpuid);
if (!policy)
return 0;
else
return policy->cur;
}
I linked the necesary librairy, but while executing my makefile, i
having the followinf error:
XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: error: expected declaration specifiers or â...â before âcpufreq_statistic_dataâ XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ In file included from readCurrentCpuCounters.c:6:XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:23: warning: parameter names (without types) in function declaration XenRoot/xen/include/acpi/cpufreq/cpufreq.h:25: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âcpufreq_verboseâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: error: expected declaration specifiers or â...â before âcpufreq_cpu_policyâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: warning: data definition has no type or storage class XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: warning: type defaults to âintâ in declaration of âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/cpufreq.h:62: error: conflicting types for âDECLARE_PER_CPUâ XenRoot/xen/include/acpi/cpufreq/processor_perf.h:61: note: previous declaration of âDECLARE_PER_CPUâ was here XenRoot/xen/include/acpi/cpufreq/cpufreq.h: In function âcpufreq_register_driverâ: XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: âEINVALâ undeclared (first use in this function) XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: (Each undeclared identifier is reported only once XenRoot/xen/include/acpi/cpufreq/cpufreq.h:164: error: for each function it appears in.) XenRoot/xen/include/acpi/cpufreq/cpufreq.h:167: error: âEBUSYâ undeclared (first use in this function) XenRoot/xen/include/acpi/cpufreq/cpufreq.h: In function âcpufreq_unregister_driverâ: XenRoot/xen/include/acpi/cpufreq/cpufreq.h:177: error: âEINVALâ undeclared (first use in this function) readCurrentCpuCounters.c: In function âget_cur_freq_on_cpuâ:readCurrentCpuCounters.c:26: error: âper_cpu__cpufreq_cpu_policyâ undeclared (first use in this function) readCurrentCpuCounters.c:26: warning: type defaults to âintâ in declaration of âtype nameâ readCurrentCpuCounters.c:26: error: invalid type argument of âunary *â (have âintâ) make: *** [readCurrentCpuCounters.o] Erreur 1 Please, what can i do to solve this issue. PS: i'm using Xen in his 4.1.2 version. Thanks in advance On Wed, 2 Jan 2013 22:02:05 -0800 (PST), Lakshman Jayaraju wrote: Hi all,My aim is to invoke hypercalls from programs inside guest domains. So in _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |