Hi, I'm trying to write my own custom scheduler.
I'm having trouble knowing where to declare my code and what's the best way to "stick it into the kernel".
1. I have a global: custom_scheduler = 0, which the user can toggle
2. in kern/kern_switch.c:
What's the best way to include my function my_scheduler(struct runq* rq)? Can I create a kld module? Or must I #include <kern/my_scheduler.c> or something along those lines?
Sorry for such a dumb question, but I'm just starting with freebsd development.
Thanks!
I'm having trouble knowing where to declare my code and what's the best way to "stick it into the kernel".
1. I have a global: custom_scheduler = 0, which the user can toggle
2. in kern/kern_switch.c:
Code:
runq_choose() {
...
if(custom_scheduler)
return my_scheduler(rq);
...
}
What's the best way to include my function my_scheduler(struct runq* rq)? Can I create a kld module? Or must I #include <kern/my_scheduler.c> or something along those lines?
Sorry for such a dumb question, but I'm just starting with freebsd development.
Thanks!