mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
parent
c8cf33a251
commit
5bdc88bf57
@ -171,7 +171,7 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout
|
|||||||
/**
|
/**
|
||||||
* Returns the currently active job
|
* Returns the currently active job
|
||||||
*/
|
*/
|
||||||
Job & scheduled_job() const {
|
Job & scheduled_job() {
|
||||||
return *static_cast<Job *>(&_scheduler.head())->helping_destination(); }
|
return *static_cast<Job *>(&_scheduler.head())->helping_destination(); }
|
||||||
|
|
||||||
unsigned id() const { return _id; }
|
unsigned id() const { return _id; }
|
||||||
|
@ -313,9 +313,12 @@ void Cpu_scheduler::quota(Share &s, unsigned const q)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Cpu_share &Cpu_scheduler::head() const
|
Cpu_share &Cpu_scheduler::head()
|
||||||
{
|
{
|
||||||
assert(_head);
|
if (!_head) {
|
||||||
|
Genode::error("attempt to access invalid scheduler head");
|
||||||
|
update(_last_time);
|
||||||
|
}
|
||||||
return *_head;
|
return *_head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ class Kernel::Cpu_scheduler
|
|||||||
* Accessors
|
* Accessors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Share &head() const;
|
Share &head();
|
||||||
unsigned head_quota() const {
|
unsigned head_quota() const {
|
||||||
return Genode::min(_head_quota, _residual); }
|
return Genode::min(_head_quota, _residual); }
|
||||||
unsigned quota() const { return _quota; }
|
unsigned quota() const { return _quota; }
|
||||||
|
Loading…
Reference in New Issue
Block a user