2012-03-29 17:21:32 -05:00
|
|
|
#ifndef RUST_SCHED_LAUNCHER_H
|
|
|
|
#define RUST_SCHED_LAUNCHER_H
|
|
|
|
|
|
|
|
#include "rust_internal.h"
|
|
|
|
#include "sync/rust_thread.h"
|
2012-03-30 19:10:02 -05:00
|
|
|
#include "rust_sched_driver.h"
|
2012-03-29 17:21:32 -05:00
|
|
|
|
|
|
|
class rust_sched_launcher
|
|
|
|
: public kernel_owned<rust_sched_launcher>,
|
2012-03-31 23:44:06 -05:00
|
|
|
private rust_thread {
|
2012-03-29 17:21:32 -05:00
|
|
|
public:
|
|
|
|
rust_kernel *kernel;
|
|
|
|
|
|
|
|
private:
|
2012-03-29 18:31:30 -05:00
|
|
|
rust_sched_loop sched_loop;
|
2012-03-30 19:10:02 -05:00
|
|
|
rust_sched_driver driver;
|
2012-03-29 17:21:32 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
rust_sched_launcher(rust_scheduler *sched, rust_srv *srv, int id);
|
|
|
|
|
2012-03-31 23:44:06 -05:00
|
|
|
void start() { rust_thread::start(); }
|
|
|
|
void run() { driver.start_main_loop(); }
|
|
|
|
void join() { rust_thread::join(); }
|
2012-03-29 18:31:30 -05:00
|
|
|
rust_sched_loop *get_loop() { return &sched_loop; }
|
2012-03-29 17:21:32 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RUST_SCHED_LAUNCHER_H
|