Skip to content
Snippets Groups Projects
Commit ea023b94 authored by meto's avatar meto
Browse files

Fixed some signatures and declarations. Kernel compiles!

parent b481f271
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ int init_perf_event(struct plan_entry plan_entry){ ...@@ -29,7 +29,7 @@ int init_perf_event(struct plan_entry plan_entry){
return -1; return -1;
} }
return fd; return 0;
} }
//terminate perf event - return performance counter value //terminate perf event - return performance counter value
...@@ -47,17 +47,18 @@ long long terminate_perf_event(int fd, u64 task_id){ ...@@ -47,17 +47,18 @@ long long terminate_perf_event(int fd, u64 task_id){
//handle the perf overflow event -> task needed more instructions than planed //handle the perf overflow event -> task needed more instructions than planed
void overflow_handler( void overflow_handler(
struct perf_event *, struct perf_event *event,
struct perf_sample_data *, struct perf_sample_data *data,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct pb_rq *pb_rq; struct pb_rq *pb_rq;
int cpu; int cpu;
int fd; // int fd;
cpu = smp_processor_id(); cpu = smp_processor_id();
pb_rq = cpu_rq(cpu)->pb; // pb_rq = cpu_rq(cpu)->pb;
fd =pb_rq->fd; pb_rq = &cpu_rq(cpu)->pb; /* der compiler meckert: error: incompatible types when assigning to type ‘struct pb_rq *’ from type ‘struct pb_rq’ */
// fd =pb_rq->fd;
printk(KERN_WARNING "task %llu ran too long\n",pb_rq->plan[pb_rq->c_entry].task_id); printk(KERN_WARNING "task %llu ran too long\n",pb_rq->plan[pb_rq->c_entry].task_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment