mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
rt: Make rust_sched_launcher hide it's thread implementation
This commit is contained in:
parent
2d8ef7387e
commit
a17097a57b
@ -10,8 +10,3 @@ rust_sched_launcher::rust_sched_launcher(rust_scheduler *sched,
|
||||
sched_loop(sched, srv, id),
|
||||
driver(&sched_loop) {
|
||||
}
|
||||
|
||||
void
|
||||
rust_sched_launcher::run() {
|
||||
driver.start_main_loop();
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
class rust_sched_launcher
|
||||
: public kernel_owned<rust_sched_launcher>,
|
||||
public rust_thread {
|
||||
private rust_thread {
|
||||
public:
|
||||
rust_kernel *kernel;
|
||||
|
||||
@ -18,7 +18,9 @@ private:
|
||||
public:
|
||||
rust_sched_launcher(rust_scheduler *sched, rust_srv *srv, int id);
|
||||
|
||||
virtual void run();
|
||||
void start() { rust_thread::start(); }
|
||||
void run() { driver.start_main_loop(); }
|
||||
void join() { rust_thread::join(); }
|
||||
rust_sched_loop *get_loop() { return &sched_loop; }
|
||||
};
|
||||
|
||||
|
@ -20,9 +20,7 @@ class rust_thread {
|
||||
|
||||
void start();
|
||||
|
||||
virtual void run() {
|
||||
return;
|
||||
}
|
||||
virtual void run() = 0;
|
||||
|
||||
void join();
|
||||
void detach();
|
||||
|
Loading…
Reference in New Issue
Block a user