mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-13 22:23:45 +00:00
parent
17f17df74b
commit
8818d810a1
@ -315,9 +315,6 @@ Kernel::Mode_transition_control * Kernel::mtc()
|
||||
}
|
||||
|
||||
|
||||
Kernel::Processor_client::~Processor_client() { }
|
||||
|
||||
|
||||
Kernel::Cpu_context::Cpu_context()
|
||||
{
|
||||
_init(STACK_SIZE);
|
||||
|
@ -73,19 +73,19 @@ class Kernel::Double_list_item
|
||||
Double_list_item * _prev;
|
||||
Double_list<T> * _list;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Return wether this item is managed by a list currently
|
||||
*/
|
||||
bool _listed() const { return _list; }
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Double_list_item() : _next(0), _prev(0), _list(0) { }
|
||||
|
||||
|
||||
/***************
|
||||
** Accessors **
|
||||
***************/
|
||||
|
||||
Double_list<T> * list() { return _list; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@ -217,6 +217,13 @@ class Kernel::Scheduler_item : public Double_list<T>::Item
|
||||
|
||||
Priority const _priority;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Return wether this item is managed by a scheduler currently
|
||||
*/
|
||||
bool _scheduled() const { return Double_list<T>::Item::_listed(); }
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -370,7 +377,11 @@ class Kernel::Processor_client : public Processor_scheduler::Item
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Processor_client();
|
||||
~Processor_client()
|
||||
{
|
||||
if (!_scheduled()) { return; }
|
||||
_unschedule();
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _KERNEL__SCHEDULER_H_ */
|
||||
|
@ -189,8 +189,6 @@ Thread::Thread(unsigned const priority, char const * const label)
|
||||
cpu_exception = RESET;
|
||||
}
|
||||
|
||||
Thread::~Thread() { if (Processor_client::list()) { _unschedule(STOPPED); } }
|
||||
|
||||
|
||||
void
|
||||
Thread::init(Processor * const processor, unsigned const pd_id_arg,
|
||||
|
@ -298,11 +298,6 @@ class Kernel::Thread
|
||||
*/
|
||||
Thread(unsigned const priority, char const * const label);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~Thread();
|
||||
|
||||
/**
|
||||
* Prepare thread to get scheduled the first time
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user