mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
parent
afdabe9df8
commit
ee5d213c1f
@ -48,7 +48,7 @@ class Genode::Interrupt_handler : public Thread<4096>
|
||||
{
|
||||
private:
|
||||
|
||||
Interrupt_handler() { start(); }
|
||||
Interrupt_handler() : Thread("irq_handler") { start(); }
|
||||
|
||||
public:
|
||||
|
||||
|
@ -19,7 +19,8 @@ struct Thread : Genode::Thread<STACK_SIZE>
|
||||
{
|
||||
Genode::Lock &_barrier;
|
||||
|
||||
Thread(Genode::Lock &barrier) : _barrier(barrier) { start(); }
|
||||
Thread(Genode::Lock &barrier)
|
||||
: Genode::Thread<STACK_SIZE>("stat"), _barrier(barrier) { start(); }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -403,7 +403,7 @@ namespace Genode {
|
||||
*
|
||||
* \param name thread name (for debugging)
|
||||
*/
|
||||
explicit Thread(const char *name = "<noname>")
|
||||
explicit Thread(const char *name)
|
||||
: Thread_base(name, STACK_SIZE) { }
|
||||
};
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ int main(int argc, char **argv)
|
||||
/* construct the thread objects */
|
||||
for (unsigned i = 0; i < cpus.total(); i++)
|
||||
threads[i] = new (env()->heap())
|
||||
Spinning_thread(cpus.location_of_index(i), "thread");
|
||||
Spinning_thread(cpus.location_of_index(i), "spinning_thread");
|
||||
|
||||
/* wait until all threads are up and running */
|
||||
for (unsigned i = 0; i < cpus.total(); i++)
|
||||
|
@ -156,7 +156,7 @@ struct Destruct_thread : Genode::Thread<4096>
|
||||
PLOG("thread: destruction completed, job done");
|
||||
}
|
||||
|
||||
Destruct_thread(Object *obj) : obj(obj) { }
|
||||
Destruct_thread(Object *obj) : Thread("object_destructor"), obj(obj) { }
|
||||
};
|
||||
|
||||
|
||||
|
@ -50,6 +50,7 @@ class Local_fault_handler : public Thread<4096>
|
||||
|
||||
Local_fault_handler(Rm_session *rm_session, Signal_receiver *receiver)
|
||||
:
|
||||
Thread("local_fault_handler"),
|
||||
_rm_session(rm_session), _receiver(receiver)
|
||||
{ }
|
||||
|
||||
|
@ -52,7 +52,9 @@ namespace Nic {
|
||||
void inc(size_t s) { cnt++; size += s; }
|
||||
void inc_burst() { burst++; }
|
||||
|
||||
Counter(char const *prefix) : prefix(prefix), cnt(0), burst(0), size(0) { start(); }
|
||||
Counter(char const *prefix)
|
||||
: Thread("counter"), prefix(prefix), cnt(0), burst(0), size(0)
|
||||
{ start(); }
|
||||
};
|
||||
#else
|
||||
struct Counter
|
||||
|
@ -180,7 +180,7 @@ class Timer_thread : public Thread<4096>
|
||||
*
|
||||
* Start thread immediately on construction.
|
||||
*/
|
||||
Timer_thread() { start(); }
|
||||
Timer_thread() : Thread("timer") { start(); }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -248,6 +248,7 @@ class Child_destructor_thread : Thread<2*4096>
|
||||
* Constructor
|
||||
*/
|
||||
Child_destructor_thread() :
|
||||
Thread("child_destructor"),
|
||||
_curr_child(0), _curr_alloc(0),
|
||||
_activate_lock(Lock::LOCKED),
|
||||
_ready(true)
|
||||
|
@ -43,7 +43,7 @@ namespace Lwip {
|
||||
|
||||
public:
|
||||
|
||||
Scheduler() : _curr_time(0) { }
|
||||
Scheduler() : Thread("lwip_timeout_sched"), _curr_time(0) { }
|
||||
|
||||
Genode::Alarm::Time curr_time() { return _curr_time; }
|
||||
};
|
||||
|
@ -43,6 +43,8 @@ class Client : public Genode::Thread<4096>
|
||||
{
|
||||
public:
|
||||
|
||||
Client() : Thread("client") { }
|
||||
|
||||
void entry()
|
||||
{
|
||||
/* client loop */
|
||||
|
@ -44,7 +44,7 @@ namespace Block {
|
||||
public:
|
||||
|
||||
Tx_thread(Session_component *session)
|
||||
: _session(session) { }
|
||||
: Thread("block_session_tx"), _session(session) { }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -74,7 +74,8 @@ class Input::Tablet_driver : Genode::Thread<8192>
|
||||
}
|
||||
|
||||
Tablet_driver(Event_queue &ev_queue)
|
||||
: _ev_queue(ev_queue),
|
||||
: Thread("touchscreen_signal_handler"),
|
||||
_ev_queue(ev_queue),
|
||||
_gpio_ts(GPIO_TOUCH),
|
||||
_gpio_bt(GPIO_BUTTON),
|
||||
_ts_sig_cap(_init_ts_gpio()),
|
||||
|
@ -30,6 +30,7 @@ class Irq_handler : Genode::Thread<4096>
|
||||
|
||||
Irq_handler(int irq_number, Input_driver &input_driver)
|
||||
:
|
||||
Thread("irq_handler"),
|
||||
_irq(irq_number),
|
||||
_input_driver(input_driver)
|
||||
{
|
||||
|
@ -34,6 +34,7 @@ class Irq_handler : Genode::Thread<4096>
|
||||
|
||||
Irq_handler(int irq_number, Serial_interface *channel, Input_driver &input_driver)
|
||||
:
|
||||
Thread("irq_handler"),
|
||||
_irq(irq_number),
|
||||
_channel(channel),
|
||||
_input_driver(input_driver)
|
||||
|
@ -172,6 +172,7 @@ namespace Timer {
|
||||
*/
|
||||
Timeout_scheduler(Platform_timer *pt, Genode::Rpc_entrypoint *ep)
|
||||
:
|
||||
Thread("timeout_scheduler"),
|
||||
_platform_timer(pt),
|
||||
_irq_dispatcher_component(this, pt),
|
||||
_irq_dispatcher_cap(ep->manage(&_irq_dispatcher_component))
|
||||
|
@ -49,8 +49,11 @@ class Kdb_uart : public Uart::Driver
|
||||
|
||||
Char_avail_checker_thread(Uart::Driver &uart_driver,
|
||||
Uart::Char_avail_callback &char_avail_callback)
|
||||
: _uart_driver(uart_driver),
|
||||
_char_avail_callback(char_avail_callback) { }
|
||||
:
|
||||
Thread<STACK_SIZE>("char_avail_handler"),
|
||||
_uart_driver(uart_driver),
|
||||
_char_avail_callback(char_avail_callback)
|
||||
{ }
|
||||
|
||||
void entry()
|
||||
{
|
||||
@ -72,8 +75,9 @@ class Kdb_uart : public Uart::Driver
|
||||
* Constructor
|
||||
*/
|
||||
Kdb_uart(Uart::Char_avail_callback &callback)
|
||||
: _buffered_char(-1),
|
||||
_char_avail_checker_thread(*this, callback)
|
||||
:
|
||||
_buffered_char(-1),
|
||||
_char_avail_checker_thread(*this, callback)
|
||||
{
|
||||
_char_avail_checker_thread.start();
|
||||
}
|
||||
|
@ -217,6 +217,8 @@ namespace Iso {
|
||||
|
||||
public:
|
||||
|
||||
Pager() : Thread("iso_pager") { }
|
||||
|
||||
Signal_receiver *signal_receiver() { return &_receiver; }
|
||||
|
||||
void entry()
|
||||
|
@ -116,7 +116,7 @@ class Audio_out::Mixer : public Thread<1024 * sizeof(addr_t)>
|
||||
|
||||
Mixer()
|
||||
:
|
||||
Thread("mixer"),
|
||||
Thread("audio_out_mixer"),
|
||||
_sleep_lock(Lock::LOCKED), _left("left", false, true),
|
||||
_right("right", false, true)
|
||||
{
|
||||
|
@ -128,6 +128,7 @@ namespace Nic {
|
||||
:
|
||||
Genode::Allocator_avl(rx_block_md_alloc),
|
||||
Tx_rx_communication_buffers(tx_buf_size, rx_buf_size),
|
||||
Thread("nic_packet_handler"),
|
||||
Session_rpc_object(Tx_rx_communication_buffers::tx_ds(),
|
||||
Tx_rx_communication_buffers::rx_ds(),
|
||||
static_cast<Genode::Range_allocator *>(this), ep)
|
||||
|
@ -59,7 +59,7 @@ namespace Block {
|
||||
public:
|
||||
|
||||
Tx_thread(Session_component *session)
|
||||
: _session(session) { }
|
||||
: Thread("block_session_tx"), _session(session) { }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -51,7 +51,8 @@ namespace Block {
|
||||
addr_t dev_addr,
|
||||
size_t dev_size,
|
||||
size_t blk_size)
|
||||
: _session(session),
|
||||
: Thread("block_session_tx"),
|
||||
_session(session),
|
||||
_dev_addr(dev_addr),
|
||||
_dev_size(dev_size),
|
||||
_blk_size(blk_size) { }
|
||||
|
@ -331,7 +331,8 @@ namespace Genode {
|
||||
Vmm(addr_t tsc_base, addr_t tpc_base,
|
||||
addr_t sys_base, addr_t sp810_base,
|
||||
Vm *vm)
|
||||
: _tsc_io_mem(tsc_base, 0x1000),
|
||||
: Thread("vmm_signal_handler"),
|
||||
_tsc_io_mem(tsc_base, 0x1000),
|
||||
_tpc_io_mem(tpc_base, 0x1000),
|
||||
_sys_io_mem(sys_base, 0x1000),
|
||||
_sp810_io_mem(sp810_base, 0x1000),
|
||||
|
@ -46,7 +46,7 @@ class Alarm_thread : Thread<4096>, public Alarm_scheduler
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Alarm_thread(): _curr_time(0) { start(); }
|
||||
Alarm_thread(): Thread("alarm"), _curr_time(0) { start(); }
|
||||
|
||||
Alarm::Time curr_time() { return _curr_time; }
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ class Worker : public Genode::Thread<8192>
|
||||
* Constructor
|
||||
*/
|
||||
Worker(Genode::Allocator_avl *block_alloc)
|
||||
: _blk_con(block_alloc) { }
|
||||
: Thread("worker"), _blk_con(block_alloc) { }
|
||||
|
||||
void dump(Block::Packet_descriptor &p1, Block::Packet_descriptor &p2)
|
||||
{
|
||||
|
@ -50,7 +50,8 @@ namespace Block {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Tx_thread(Session_component *session) : _session(session) { }
|
||||
Tx_thread(Session_component *session)
|
||||
: Thread("block_session_tx"), _session(session) { }
|
||||
|
||||
/**
|
||||
* Thread entry function.
|
||||
|
@ -48,6 +48,8 @@ class Pager : public Thread<8192>
|
||||
|
||||
public:
|
||||
|
||||
Pager() : Thread("pager") { }
|
||||
|
||||
Signal_receiver *signal_receiver() { return &_receiver; }
|
||||
|
||||
void entry()
|
||||
|
@ -140,6 +140,7 @@ class Source : private Genode::Thread<STACK_SIZE>,
|
||||
Source(Genode::Dataspace_capability ds_cap)
|
||||
:
|
||||
/* init bulk buffer allocator, storing its meta data on the heap */
|
||||
Thread("source"),
|
||||
Genode::Allocator_avl(Genode::env()->heap()),
|
||||
Packet_stream_source<Test_packet_stream_policy>(this, ds_cap),
|
||||
_operation(OP_NONE),
|
||||
@ -220,6 +221,7 @@ class Sink : private Genode::Thread<STACK_SIZE>,
|
||||
*/
|
||||
Sink(Genode::Dataspace_capability ds_cap)
|
||||
:
|
||||
Thread("sink"),
|
||||
Packet_stream_sink<Test_packet_stream_policy>(ds_cap),
|
||||
_operation(OP_NONE),
|
||||
_lock(Genode::Lock::LOCKED),
|
||||
|
@ -39,7 +39,7 @@ class Comparer : public Genode::Thread<8192>
|
||||
|
||||
Comparer(Genode::Allocator_avl *block_alloc,
|
||||
const char* filename)
|
||||
: _blk_con(block_alloc), _rom(filename),
|
||||
: Thread("comparer"), _blk_con(block_alloc), _rom(filename),
|
||||
_addr(Genode::env()->rm_session()->attach(_rom.dataspace())) { }
|
||||
|
||||
void entry()
|
||||
|
@ -71,6 +71,7 @@ class Sender : Thread<4096>
|
||||
Sender(Signal_context_capability context,
|
||||
unsigned interval_ms, bool verbose = true)
|
||||
:
|
||||
Thread("sender"),
|
||||
_transmitter(context),
|
||||
_interval_ms(interval_ms),
|
||||
_stop(false),
|
||||
@ -161,6 +162,7 @@ class Handler : Thread<4096>
|
||||
*/
|
||||
Handler(Signal_receiver *receiver, unsigned dispatch_ms, bool verbose = true)
|
||||
:
|
||||
Thread("handler"),
|
||||
_dispatch_ms(dispatch_ms),
|
||||
_id(++_id_cnt),
|
||||
_receiver(receiver),
|
||||
@ -541,7 +543,8 @@ class Signal_context_destroyer : public Thread<4096>
|
||||
public:
|
||||
|
||||
Signal_context_destroyer(Signal_receiver *receiver, Signal_context *context)
|
||||
: _receiver(receiver), _context(context) { }
|
||||
: Thread("signal_context_destroyer"),
|
||||
_receiver(receiver), _context(context) { }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -36,6 +36,7 @@ struct Worker : Genode::Thread<4096>
|
||||
|
||||
Worker(Timer::Session &timer, int result_value)
|
||||
:
|
||||
Thread("worker"),
|
||||
timer(timer), result_value(result_value), result(~0)
|
||||
{
|
||||
start();
|
||||
|
@ -32,7 +32,8 @@ class Wakeup_thread : public Thread<4096>
|
||||
Wakeup_thread(Timed_semaphore *sem,
|
||||
Timer::Session *timer,
|
||||
Alarm::Time timeout)
|
||||
: _sem(sem), _timer(timer), _timeout(timeout), _lock(Lock::LOCKED), _stop(false) { }
|
||||
: Thread("wakeup"), _sem(sem), _timer(timer), _timeout(timeout),
|
||||
_lock(Lock::LOCKED), _stop(false) { }
|
||||
|
||||
void entry()
|
||||
{
|
||||
|
@ -47,7 +47,8 @@ class Timer_client : public Genode::List<Timer_client>::Element,
|
||||
* Constructor
|
||||
*/
|
||||
Timer_client(unsigned long period_msec)
|
||||
: _period_msec(period_msec), _cnt(0), _stop(false) { }
|
||||
: Thread("timer_client"),
|
||||
_period_msec(period_msec), _cnt(0), _stop(false) { }
|
||||
|
||||
/**
|
||||
* Start calling the timer service
|
||||
|
@ -59,7 +59,7 @@ struct Counter : public Genode::Thread<8192>
|
||||
|
||||
void inc(Genode::size_t s) { cnt++; size += s; }
|
||||
|
||||
Counter() : cnt(0), size(0) { start(); }
|
||||
Counter() : Thread("net-counter"), cnt(0), size(0) { start(); }
|
||||
};
|
||||
#else
|
||||
struct Counter { inline void inc(Genode::size_t s) { } };
|
||||
|
@ -191,7 +191,7 @@ if {![regexp {\* 2 Thread 2 Test_thread::entry} $gdb_output] ||
|
||||
exit -1
|
||||
}
|
||||
|
||||
if {![regexp {40 func()} $gdb_output]} {
|
||||
if {![regexp {42 func()} $gdb_output]} {
|
||||
puts stderr "Error: Single stepping didn't result in the expected output"
|
||||
exit -1
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ namespace Noux {
|
||||
}
|
||||
|
||||
public:
|
||||
Timeout_scheduler(unsigned long curr_time) : _curr_time(curr_time) { start(); }
|
||||
Timeout_scheduler(unsigned long curr_time)
|
||||
: Thread("timeout_sched"), _curr_time(curr_time) { start(); }
|
||||
|
||||
Alarm::Time curr_time() const { return _curr_time; }
|
||||
};
|
||||
|
@ -23,6 +23,8 @@ class Test_thread : public Genode::Thread<2*4096>
|
||||
{
|
||||
public:
|
||||
|
||||
Test_thread() : Thread("test") { }
|
||||
|
||||
void func()
|
||||
{
|
||||
/*
|
||||
|
@ -347,6 +347,7 @@ Vancouver_console::Vancouver_console(Synced_motherboard &mb,
|
||||
Genode::size_t vm_fb_size,
|
||||
Genode::Dataspace_capability fb_ds)
|
||||
:
|
||||
Thread("vmm_console"),
|
||||
_startup_lock(Genode::Lock::LOCKED),
|
||||
_vm_fb_size(vm_fb_size), _motherboard(mb), _console_lock(console_lock),
|
||||
_fb_size(0), _pixels(0), _guest_fb(0),
|
||||
|
@ -54,6 +54,7 @@ Vancouver_disk::Vancouver_disk(Synced_motherboard &mb,
|
||||
char * backing_store_base,
|
||||
char * backing_store_fb_base)
|
||||
:
|
||||
Thread("vmm_disk"),
|
||||
_motherboard(mb), _backing_store_base(backing_store_base),
|
||||
_backing_store_fb_base(backing_store_fb_base),
|
||||
_tslab_msg(disk_heap()), _tslab_dma(disk_heap()), _tslab_avl(disk_heap())
|
||||
|
@ -132,7 +132,8 @@ class Alarm_thread : Thread<4096>, public Alarm_scheduler
|
||||
* Constructor
|
||||
*/
|
||||
Alarm_thread(Synced_motherboard &mb, Synced_timeout_list &timeouts)
|
||||
: _curr_time(0), _motherboard(mb), _timeouts(timeouts) { start(); }
|
||||
: Thread("alarm"), _curr_time(0), _motherboard(mb), _timeouts(timeouts)
|
||||
{ start(); }
|
||||
|
||||
Alarm::Time curr_time() { return _curr_time; }
|
||||
unsigned long long curr_time_long() { return _motherboard()->clock()->time(); }
|
||||
@ -799,6 +800,7 @@ class Vcpu_dispatcher : public Genode::Thread<STACK_SIZE>,
|
||||
bool has_svm,
|
||||
bool has_vmx)
|
||||
:
|
||||
Thread("vcpu_dispatcher"),
|
||||
_vcpu(vcpu_lock, unsynchronized_vcpu),
|
||||
_vcpu_thread("vCPU thread"),
|
||||
_guest_memory(guest_memory),
|
||||
|
@ -25,7 +25,7 @@ extern const void * _forward_pkt;
|
||||
|
||||
|
||||
Vancouver_network::Vancouver_network(Synced_motherboard &mb, Nic::Session *nic)
|
||||
: _motherboard(mb), _nic(nic)
|
||||
: Thread("vmm_network"), _motherboard(mb), _nic(nic)
|
||||
{
|
||||
start();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user