rt: Introduce rust_manual_sched_launcher_factory. Again, so sorry
This commit is contained in:
parent
7c1be236a5
commit
3654ef0078
2 changed files with 18 additions and 0 deletions
|
@ -27,3 +27,11 @@ rust_thread_sched_launcher_factory::create(rust_scheduler *sched, int id) {
|
|||
return new(sched->kernel, "rust_thread_sched_launcher")
|
||||
rust_thread_sched_launcher(sched, srv, id);
|
||||
}
|
||||
|
||||
rust_sched_launcher *
|
||||
rust_manual_sched_launcher_factory::create(rust_scheduler *sched, int id) {
|
||||
assert(launcher == NULL && "I can only track one sched_launcher");
|
||||
rust_srv *srv = sched->srv->clone();
|
||||
return new(sched->kernel, "rust_manual_sched_launcher")
|
||||
rust_manual_sched_launcher(sched, srv, id);
|
||||
}
|
||||
|
|
|
@ -55,4 +55,14 @@ public:
|
|||
virtual rust_sched_launcher *create(rust_scheduler *sched, int id);
|
||||
};
|
||||
|
||||
class rust_manual_sched_launcher_factory
|
||||
: public rust_sched_launcher_factory {
|
||||
private:
|
||||
rust_manual_sched_launcher *launcher;
|
||||
public:
|
||||
rust_manual_sched_launcher_factory() : launcher(NULL) { }
|
||||
virtual rust_sched_launcher *create(rust_scheduler *sched, int id);
|
||||
rust_manual_sched_launcher *get_launcher() { return launcher; }
|
||||
};
|
||||
|
||||
#endif // RUST_SCHED_LAUNCHER_H
|
||||
|
|
Loading…
Add table
Reference in a new issue