2009/3/12 Sukanto Ghosh <[email protected]>:
> Hi,
>
> The complete definition of structure cfs_rq is in a .c file
> (kernel/sched.c). In the head linux/sched.h it has been declared as
> "struct cfs_rq;"
> What is the purpose of doing so ?
because the structure define is after it has been used,so we will
declare it firstly in the beginning.
the define after line 364 for my version kernel C file (kernel/sched.c).
/* CFS-related fields in a runqueue */
struct cfs_rq {
struct load_weight load;
unsigned long nr_running;
u64 exec_clock;
u64 min_vruntime;
struct rb_root tasks_timeline;
struct rb_node *rb_leftmost;
struct list_head tasks;
struct list_head *balance_iterator;
/*
.....
}
>
> Because of this I am facing a problem while compiling a jprobes-module
> that instruments the __enqueue_entity function. When I am using the
> expression "cfs_rq->load.weight", gcc complaints that "dereferencing
> pointer to an incomplete type". But you will find that the cfs_rq
> pointer has been dereferenced in the function i am instrumenting ...
>
>
>
> --
> Regards,
> Sukanto Ghosh
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ