diff --git a/base-codezero/src/base/ipc/ipc.cc b/base-codezero/src/base/ipc/ipc.cc index 7a7e43c08..5b4c1e039 100644 --- a/base-codezero/src/base/ipc/ipc.cc +++ b/base-codezero/src/base/ipc/ipc.cc @@ -34,17 +34,17 @@ void Ipc_ostream::_send() { if (verbose_ipc) PDBG("thread %d sends IPC to %d, write_offset=%d", - thread_myself(), _dst.tid(), _write_offset); + thread_myself(), _dst.dst(), _write_offset); umword_t snd_size = min(_write_offset, (unsigned)L4_IPC_EXTENDED_MAX_SIZE); *(umword_t *)_snd_msg->addr() = _dst.local_name(); - int ret = l4_send_extended(_dst.tid(), L4_IPC_TAG_SYNC_EXTENDED, + int ret = l4_send_extended(_dst.dst(), L4_IPC_TAG_SYNC_EXTENDED, snd_size, _snd_msg->addr()); if (ret < 0) PERR("l4_send_extended (to thread %d) returned ret=%d", - _dst.tid(), ret); + _dst.dst(), ret); _write_offset = sizeof(umword_t); } @@ -71,7 +71,7 @@ void Ipc_istream::_wait() if (verbose_ipc) PDBG("thread %d waits for IPC from %d, rcv_buf at %p, rcv_size=%d", - tid(), _rcv_cs, rcv_buf, (int)rcv_size); + dst(), _rcv_cs, rcv_buf, (int)rcv_size); int ret = l4_receive_extended(_rcv_cs, rcv_size, rcv_buf); if (ret < 0) @@ -79,7 +79,7 @@ void Ipc_istream::_wait() if (verbose_ipc) PDBG("thread %d received IPC from %d", - tid(), l4_get_sender()); + dst(), l4_get_sender()); _read_offset = sizeof(umword_t); } @@ -107,7 +107,7 @@ void Ipc_client::_call() { #warning l4_sendrecv_extended is not yet implemented in l4lib/arch/syslib.h _send(); - _rcv_cs = _dst.tid(); + _rcv_cs = _dst.dst(); _wait(); _rcv_cs = L4_ANYTHREAD; diff --git a/base-codezero/src/base/pager/pager.cc b/base-codezero/src/base/pager/pager.cc index ba1956600..dbb14d03b 100644 --- a/base-codezero/src/base/pager/pager.cc +++ b/base-codezero/src/base/pager/pager.cc @@ -90,7 +90,7 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) _activation->cap(); - Untyped_capability cap = Native_capability(_activation->cap().tid(), obj->badge()); + Untyped_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-codezero/src/core/platform_thread.cc b/base-codezero/src/core/platform_thread.cc index 7470ac094..6112bd61a 100644 --- a/base-codezero/src/core/platform_thread.cc +++ b/base-codezero/src/core/platform_thread.cc @@ -35,7 +35,7 @@ void Platform_thread::set_cpu(unsigned int cpu_no) int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no) { - Native_thread_id pager = _pager ? _pager->cap().tid() : -1; + Native_thread_id pager = _pager ? _pager->cap().dst() : -1; /* setup thread context */ struct exregs_data exregs; diff --git a/base-fiasco/src/base/ipc/ipc.cc b/base-fiasco/src/base/ipc/ipc.cc index 2f3ea780c..c1bfb7087 100644 --- a/base-fiasco/src/base/ipc/ipc.cc +++ b/base-fiasco/src/base/ipc/ipc.cc @@ -35,7 +35,7 @@ void Ipc_ostream::_send() _snd_msg->send_dope = L4_IPC_DOPE((_write_offset + sizeof(umword_t) - 1)>>2, 0); l4_msgdope_t result; - l4_ipc_send(_dst.tid(), _snd_msg->addr(), _dst.local_name(), + l4_ipc_send(_dst.dst(), _snd_msg->addr(), _dst.local_name(), *reinterpret_cast(&_snd_msg->buf[sizeof(umword_t)]), L4_IPC_NEVER, &result); @@ -120,7 +120,7 @@ void Ipc_client::_call() _snd_msg->send_dope = L4_IPC_DOPE((_write_offset + 2*sizeof(umword_t) - 1)>>2, 0); _rcv_msg->size_dope = L4_IPC_DOPE(_rcv_msg->size()>>2, 0); - l4_ipc_call(_dst.tid(), + l4_ipc_call(_dst.dst(), _write_offset <= 2*sizeof(umword_t) ? L4_IPC_SHORT_MSG : _snd_msg->addr(), _dst.local_name(), *reinterpret_cast(&_snd_msg->buf[sizeof(umword_t)]), @@ -193,7 +193,7 @@ void Ipc_server::_reply() _snd_msg->send_dope = L4_IPC_DOPE((_write_offset + sizeof(umword_t) - 1)>>2, 0); l4_msgdope_t result; - l4_ipc_send(_dst.tid(), _snd_msg->addr(), _dst.local_name(), + l4_ipc_send(_dst.dst(), _snd_msg->addr(), _dst.local_name(), *reinterpret_cast(&_snd_msg->buf[sizeof(umword_t)]), L4_IPC_SEND_TIMEOUT_0, &result); @@ -221,7 +221,7 @@ void Ipc_server::_reply_wait() * an integer as RPC result. */ l4_ipc_reply_and_wait( - _dst.tid(), + _dst.dst(), _write_offset <= 2*sizeof(umword_t) ? L4_IPC_SHORT_MSG : _snd_msg->addr(), _dst.local_name(), *reinterpret_cast(&_snd_msg->buf[sizeof(umword_t)]), diff --git a/base-fiasco/src/base/pager/pager.cc b/base-fiasco/src/base/pager/pager.cc index 1b9ebe72f..21670a159 100644 --- a/base-fiasco/src/base/pager/pager.cc +++ b/base-fiasco/src/base/pager/pager.cc @@ -105,8 +105,8 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) /* return invalid capability if no activation is present */ if (!_activation) return Pager_capability(); - Native_thread_id tid = _activation->cap().tid(); - Native_capability cap(_activation->cap().tid(), obj->badge()); + Native_thread_id tid = _activation->cap().dst(); + Native_capability cap(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-fiasco/src/core/platform_thread.cc b/base-fiasco/src/core/platform_thread.cc index ecf00e60b..3a60bba49 100644 --- a/base-fiasco/src/core/platform_thread.cc +++ b/base-fiasco/src/core/platform_thread.cc @@ -37,7 +37,7 @@ int Platform_thread::start(void *ip, void *sp) { l4_umword_t dummy, old_eflags; l4_threadid_t thread = _l4_thread_id; - l4_threadid_t pager = _pager ? _pager->cap().tid() : L4_INVALID_ID; + l4_threadid_t pager = _pager ? _pager->cap().dst() : L4_INVALID_ID; l4_threadid_t preempter = L4_INVALID_ID; l4_threadid_t cap_handler = L4_INVALID_ID; diff --git a/base-foc/include/base/ipc.h b/base-foc/include/base/ipc.h index b11744123..414872fe9 100644 --- a/base-foc/include/base/ipc.h +++ b/base-foc/include/base/ipc.h @@ -27,7 +27,7 @@ inline void Genode::Ipc_ostream::_marshal_capability(Genode::Native_capability c long unique_id = cap.local_name(); _write_to_buf(unique_id); if (unique_id) - _snd_msg->snd_append_cap_sel(cap.tid()); + _snd_msg->snd_append_cap_sel(cap.dst()); } diff --git a/base-foc/include/base/ipc_pager.h b/base-foc/include/base/ipc_pager.h index f3591249c..75917cdf1 100644 --- a/base-foc/include/base/ipc_pager.h +++ b/base-foc/include/base/ipc_pager.h @@ -154,7 +154,7 @@ namespace Genode { * Set destination for next reply */ void set_reply_dst(Native_capability pager_object) { - _last = pager_object.tid(); } + _last = pager_object.dst(); } /** * Answer call without sending a flex-page mapping diff --git a/base-foc/include/signal_session/source_client.h b/base-foc/include/signal_session/source_client.h index 39f1a0e1f..a3cce2426 100644 --- a/base-foc/include/signal_session/source_client.h +++ b/base-foc/include/signal_session/source_client.h @@ -51,7 +51,7 @@ namespace Genode { /* request mapping of semaphore capability selector */ _sem = call(); - l4_msgtag_t tag = l4_irq_attach(_sem.tid(), 0, + l4_msgtag_t tag = l4_irq_attach(_sem.dst(), 0, Thread_base::myself()->tid()); if (l4_error(tag)) PERR("l4_irq_attach failed with %ld!", l4_error(tag)); @@ -76,7 +76,7 @@ namespace Genode { using namespace Fiasco; /* block on semaphore, will be unblocked if signal is available */ - l4_irq_receive(_sem.tid(), L4_IPC_NEVER); + l4_irq_receive(_sem.dst(), L4_IPC_NEVER); /* * Now that the server has unblocked the semaphore, we are sure diff --git a/base-foc/src/base/ipc/ipc.cc b/base-foc/src/base/ipc/ipc.cc index 8956ebd01..8f8a1454b 100644 --- a/base-foc/src/base/ipc/ipc.cc +++ b/base-foc/src/base/ipc/ipc.cc @@ -142,7 +142,7 @@ static l4_msgtag_t copy_msgbuf_to_utcb(Msgbuf_base *snd_msg, unsigned offset, void Ipc_ostream::_send() { l4_msgtag_t tag = copy_msgbuf_to_utcb(_snd_msg, _write_offset, _dst); - tag = l4_ipc_send(_dst.tid(), l4_utcb(), tag, L4_IPC_NEVER); + tag = l4_ipc_send(_dst.dst(), l4_utcb(), tag, L4_IPC_NEVER); if (ipc_error(tag, DEBUG_MSG)) throw Ipc_error(); @@ -215,7 +215,7 @@ void Ipc_client::_call() rcv_cap_sel += L4_CAP_SIZE; } - tag = l4_ipc_call(_dst.tid(), l4_utcb(), tag, L4_IPC_NEVER); + tag = l4_ipc_call(_dst.dst(), l4_utcb(), tag, L4_IPC_NEVER); if (l4_ipc_error(tag, l4_utcb()) == L4_IPC_RECANCELED) throw Genode::Blocking_canceled(); if (ipc_error(tag, DEBUG_MSG)) diff --git a/base-foc/src/base/thread/thread_start.cc b/base-foc/src/base/thread/thread_start.cc index 9f486c1f7..ea4f19ca6 100644 --- a/base-foc/src/base/thread/thread_start.cc +++ b/base-foc/src/base/thread/thread_start.cc @@ -49,7 +49,7 @@ void Thread_base::start() /* get gate-capability and badge of new thread */ Thread_state state; env()->cpu_session()->state(_thread_cap, &state); - _tid = state.cap.tid(); + _tid = state.cap.dst(); /* * send newly constructed thread, pointer to its Thread_base object, diff --git a/base-foc/src/core/cap_session_component.cc b/base-foc/src/core/cap_session_component.cc index ab5f12291..b86ba2750 100644 --- a/base-foc/src/core/cap_session_component.cc +++ b/base-foc/src/core/cap_session_component.cc @@ -118,10 +118,10 @@ void Cap_session_component::free(Native_capability cap) Capability_tree::tree()->remove(n); l4_msgtag_t tag = l4_task_unmap(L4_BASE_TASK_CAP, - l4_obj_fpage(cap.tid(), 0, L4_FPAGE_RWX), + l4_obj_fpage(cap.dst(), 0, L4_FPAGE_RWX), L4_FP_ALL_SPACES | L4_FP_DELETE_OBJ); if (l4_msgtag_has_error(tag)) - PERR("destruction of ipc-gate %lx failed!", (unsigned long) cap.tid()); + PERR("destruction of ipc-gate %lx failed!", (unsigned long) cap.dst()); /* free badge _after_ invalidating all caps */ Badge_allocator::allocator()->free(n->badge()); diff --git a/base-foc/src/core/include/platform_pd.h b/base-foc/src/core/include/platform_pd.h index f3c775d0b..590c65ca0 100644 --- a/base-foc/src/core/include/platform_pd.h +++ b/base-foc/src/core/include/platform_pd.h @@ -111,7 +111,7 @@ namespace Genode { Native_task native_task() { return _l4_task_cap; } unsigned badge() { return _badge; } - Native_thread parent_cap() { return _parent.tid(); } + Native_thread parent_cap() { return _parent.dst(); } }; } diff --git a/base-foc/src/core/include/platform_thread.h b/base-foc/src/core/include/platform_thread.h index a9c590c41..bfe47fe10 100644 --- a/base-foc/src/core/include/platform_thread.h +++ b/base-foc/src/core/include/platform_thread.h @@ -147,14 +147,14 @@ namespace Genode { * Return identification of thread when faulting */ unsigned long pager_object_badge() { - return (unsigned long) _thread_cap.tid(); } + return (unsigned long) _thread_cap.dst(); } /******************************* ** Fiasco-specific Accessors ** *******************************/ - Native_thread native_thread() const { return _thread_cap.tid(); } + Native_thread native_thread() const { return _thread_cap.dst(); } Native_capability thread_cap() const { return _thread_cap; } Native_capability gate() const { return _remote_gate_cap; } const char *name() const { return _name; } diff --git a/base-foc/src/core/irq_session_component.cc b/base-foc/src/core/irq_session_component.cc index 1ee70cc2e..54fe8226a 100644 --- a/base-foc/src/core/irq_session_component.cc +++ b/base-foc/src/core/irq_session_component.cc @@ -56,7 +56,7 @@ Irq_session_component::Interrupt::Interrupt() Native_thread Irq_session_component::Interrupt_handler::handler_cap() { static Interrupt_handler handler; - return handler._thread_cap.tid(); + return handler._thread_cap.dst(); } diff --git a/base-foc/src/core/platform_pd.cc b/base-foc/src/core/platform_pd.cc index cdd1cd1a4..3fdfe1e5c 100644 --- a/base-foc/src/core/platform_pd.cc +++ b/base-foc/src/core/platform_pd.cc @@ -126,7 +126,7 @@ void Platform_pd::map_parent_cap() { if (!_parent_cap_mapped) { l4_msgtag_t tag = l4_task_map(_l4_task_cap, L4_BASE_TASK_CAP, - l4_obj_fpage(_parent.tid(), 0, L4_FPAGE_RWX), + l4_obj_fpage(_parent.dst(), 0, L4_FPAGE_RWX), PARENT_CAP | L4_ITEM_MAP); if (l4_msgtag_has_error(tag)) PWRN("mapping parent cap failed"); diff --git a/base-foc/src/core/platform_thread.cc b/base-foc/src/core/platform_thread.cc index c9b122595..1ab623c79 100644 --- a/base-foc/src/core/platform_thread.cc +++ b/base-foc/src/core/platform_thread.cc @@ -41,7 +41,7 @@ int Platform_thread::start(void *ip, void *sp) if (_pager && _platform_pd) { /* map pager cap */ l4_msgtag_t tag = l4_task_map(_platform_pd->native_task(), L4_BASE_TASK_CAP, - l4_obj_fpage(_pager->cap().tid(), 0, L4_FPAGE_RWX), + l4_obj_fpage(_pager->cap().dst(), 0, L4_FPAGE_RWX), _remote_pager_cap | L4_ITEM_MAP); if (l4_msgtag_has_error(tag)) PWRN("mapping pager cap failed"); @@ -53,15 +53,15 @@ int Platform_thread::start(void *ip, void *sp) l4_thread_control_exc_handler(_remote_pager_cap); l4_thread_control_bind(_utcb, _platform_pd->native_task()); - l4_msgtag_t tag = l4_thread_control_commit(_thread_cap.tid()); + l4_msgtag_t tag = l4_thread_control_commit(_thread_cap.dst()); if (l4_msgtag_has_error(tag)) { PWRN("l4_thread_control_commit for %lx failed!", - (unsigned long) _thread_cap.tid()); + (unsigned long) _thread_cap.dst()); return -1; } /* set ip and sp and run the thread */ - tag = l4_thread_ex_regs(_thread_cap.tid(), (l4_addr_t) ip, (l4_addr_t) sp, 0); + tag = l4_thread_ex_regs(_thread_cap.dst(), (l4_addr_t) ip, (l4_addr_t) sp, 0); if (l4_msgtag_has_error(tag)) { PWRN("l4_thread_ex_regs failed!"); return -1; @@ -96,7 +96,7 @@ void Platform_thread::pause() * The pager thread, which also acts as exception handler, will * leave the thread in exception state until, it gets woken again */ - l4_thread_ex_regs_ret(_thread_cap.tid(), &_pager->state.ip, + l4_thread_ex_regs_ret(_thread_cap.dst(), &_pager->state.ip, &_pager->state.sp, &flags); bool in_syscall = flags == 0; _pager->state.lock.unlock(); @@ -111,7 +111,7 @@ void Platform_thread::pause() * the requested thread, and stored its thread state */ while (exc == _pager->state.exceptions && !_pager->state.in_exception) - l4_thread_switch(_thread_cap.tid()); + l4_thread_switch(_thread_cap.dst()); } } @@ -150,8 +150,8 @@ void Platform_thread::bind(Platform_pd *pd) if (_gate_cap.valid()) { /* map thread's gate cap */ tag = l4_task_map(task, L4_BASE_TASK_CAP, - l4_obj_fpage(_gate_cap.tid(), 0, L4_FPAGE_RWX), - _remote_gate_cap.tid() | L4_ITEM_MAP); + l4_obj_fpage(_gate_cap.dst(), 0, L4_FPAGE_RWX), + _remote_gate_cap.dst() | L4_ITEM_MAP); if (l4_msgtag_has_error(tag)) PWRN("mapping thread's gate cap failed"); } @@ -167,12 +167,12 @@ void Platform_thread::bind(Platform_pd *pd) void Platform_thread::unbind() { - l4_thread_ex_regs(_thread_cap.tid(), 0, 0, 0); + l4_thread_ex_regs(_thread_cap.dst(), 0, 0, 0); l4_task_unmap(L4_BASE_TASK_CAP, - l4_obj_fpage(_gate_cap.tid(), 0, L4_FPAGE_RWX), + l4_obj_fpage(_gate_cap.dst(), 0, L4_FPAGE_RWX), L4_FP_ALL_SPACES | L4_FP_DELETE_OBJ); l4_task_unmap(L4_BASE_TASK_CAP, - l4_obj_fpage(_thread_cap.tid(), 0, L4_FPAGE_RWX), + l4_obj_fpage(_thread_cap.dst(), 0, L4_FPAGE_RWX), L4_FP_ALL_SPACES | L4_FP_DELETE_OBJ); _platform_pd = (Platform_pd*) 0; } @@ -203,7 +203,7 @@ void Platform_thread::cancel_blocking() void Platform_thread::_create_thread() { l4_msgtag_t tag = l4_factory_create_thread(L4_BASE_FACTORY_CAP, - _thread_cap.tid()); + _thread_cap.dst()); if (l4_msgtag_has_error(tag)) PERR("cannot create more thread kernel-objects!"); } @@ -218,18 +218,18 @@ void Platform_thread::_finalize_construction(const char *name, unsigned prio) PWRN("creating thread's irq failed"); /* attach thread to irq */ - tag = l4_irq_attach(_irq_cap, 0, _thread_cap.tid()); + tag = l4_irq_attach(_irq_cap, 0, _thread_cap.dst()); if (l4_msgtag_has_error(tag)) PWRN("attaching thread's irq failed"); /* set human readable name in kernel debugger */ strncpy(_name, name, sizeof(_name)); - Fiasco::l4_debugger_set_object_name(_thread_cap.tid(), name); + Fiasco::l4_debugger_set_object_name(_thread_cap.dst(), name); /* set priority of thread */ prio = Cpu_session::scale_priority(DEFAULT_PRIORITY, prio); l4_sched_param_t params = l4_sched_param(prio); - l4_scheduler_run_thread(L4_BASE_SCHEDULER_CAP, _thread_cap.tid(), ¶ms); + l4_scheduler_run_thread(L4_BASE_SCHEDULER_CAP, _thread_cap.dst(), ¶ms); } @@ -239,7 +239,7 @@ Platform_thread::Platform_thread(const char *name, _badge(Badge_allocator::allocator()->alloc()), _thread_cap(cap_alloc()->alloc_id(_badge), _badge), - _node(_thread_cap.local_name(), 0, this, _thread_cap.tid()), + _node(_thread_cap.local_name(), 0, this, _thread_cap.dst()), _utcb(0), _platform_pd(0), _pager(0) @@ -259,7 +259,7 @@ Platform_thread::Platform_thread(const char *name, Platform_thread::Platform_thread(Native_thread cap, const char *name) : _core_thread(true), _thread_cap(cap, -1), - _node(_thread_cap.local_name(), 0, this, _thread_cap.tid()), + _node(_thread_cap.local_name(), 0, this, _thread_cap.dst()), _utcb(0), _platform_pd(0), _pager(0) @@ -276,7 +276,7 @@ Platform_thread::Platform_thread(const char *name) _badge(Badge_allocator::allocator()->alloc()), _thread_cap(cap_alloc()->alloc_id(_badge), _badge), - _node(_thread_cap.local_name(), 0, this, _thread_cap.tid()), + _node(_thread_cap.local_name(), 0, this, _thread_cap.dst()), _utcb(0), _platform_pd(0), _pager(0) @@ -304,6 +304,6 @@ Platform_thread::~Platform_thread() /* remove the thread capability */ Capability_tree::tree()->remove(&_node); - cap_alloc()->free(_thread_cap.tid()); + cap_alloc()->free(_thread_cap.dst()); Badge_allocator::allocator()->free(_badge); } diff --git a/base-foc/src/core/signal_source_component.cc b/base-foc/src/core/signal_source_component.cc index d403b1e59..f57d58a55 100644 --- a/base-foc/src/core/signal_source_component.cc +++ b/base-foc/src/core/signal_source_component.cc @@ -44,7 +44,7 @@ void Signal_source_component::submit(Signal_context_component *context, _signal_queue.enqueue(context); /* wake up client */ - Fiasco::l4_irq_trigger(_blocking_semaphore.tid()); + Fiasco::l4_irq_trigger(_blocking_semaphore.dst()); } } diff --git a/base-foc/src/core/thread_start.cc b/base-foc/src/core/thread_start.cc index 240abb389..f16193570 100644 --- a/base-foc/src/core/thread_start.cc +++ b/base-foc/src/core/thread_start.cc @@ -44,7 +44,7 @@ void Thread_base::start() new(platform()->core_mem_alloc()) Platform_thread(_context->name); platform_specific()->core_pd()->bind_thread(pt); - _tid = pt->gate().tid(); + _tid = pt->gate().dst(); _thread_cap = reinterpret_cap_cast(pt->thread_cap()); pt->pager(platform_specific()->core_pager()); diff --git a/base-host/src/base/pager/pager.cc b/base-host/src/base/pager/pager.cc index cf5c9afb5..9e5d8b8dd 100644 --- a/base-host/src/base/pager/pager.cc +++ b/base-host/src/base/pager/pager.cc @@ -46,7 +46,7 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) /* return invalid capability if no activation is present */ if (!_activation) return Pager_capability(); - Native_capability cap = Native_capability(_activation->cap().tid(), obj->badge()); + Native_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-linux/include/base/local_interface.h b/base-linux/include/base/local_interface.h index cb315a34f..6864f33ea 100644 --- a/base-linux/include/base/local_interface.h +++ b/base-linux/include/base/local_interface.h @@ -56,7 +56,7 @@ namespace Genode { static IF *deref(Capability cap) { /* check if this is a pseudo capability */ - if (cap.tid() != 0 || !cap.local_name()) + if (cap.dst() != 0 || !cap.local_name()) throw Non_local_capability(); /* diff --git a/base-linux/src/base/ipc/ipc.cc b/base-linux/src/base/ipc/ipc.cc index 024b30487..c0edbafa2 100644 --- a/base-linux/src/base/ipc/ipc.cc +++ b/base-linux/src/base/ipc/ipc.cc @@ -108,7 +108,7 @@ void Ipc_client::_prepare_next_call() { /* prepare next request in buffer */ long local_name = _dst.local_name(); - long tid = Native_capability::tid(); + long tid = Native_capability::dst(); _write_offset = 0; _write_to_buf(local_name); @@ -122,7 +122,7 @@ void Ipc_client::_prepare_next_call() void Ipc_client::_call() { if (_dst.valid()) { - lx_send_to(_rcv_cs, _dst.tid(), "server", + lx_send_to(_rcv_cs, _dst.dst(), "server", _snd_msg->buf, _write_offset); lx_recv_from(_rcv_cs, _rcv_msg->buf, _rcv_msg->size()); @@ -183,7 +183,7 @@ void Ipc_server::_wait() void Ipc_server::_reply() { try { - lx_send_to(_rcv_cs, _dst.tid(), "client", _snd_msg->buf, _write_offset); + lx_send_to(_rcv_cs, _dst.dst(), "client", _snd_msg->buf, _write_offset); } catch (Ipc_error) { } _prepare_next_reply_wait(); @@ -194,7 +194,7 @@ void Ipc_server::_reply_wait() { /* when first called, there was no request yet */ if (_reply_needed) - lx_send_to(_rcv_cs, _dst.tid(), "client", _snd_msg->buf, _write_offset); + lx_send_to(_rcv_cs, _dst.dst(), "client", _snd_msg->buf, _write_offset); _wait(); } diff --git a/base-linux/src/base/process/process.cc b/base-linux/src/base/process/process.cc index d5a1c7b2a..a354d1b9e 100644 --- a/base-linux/src/base/process/process.cc +++ b/base-linux/src/base/process/process.cc @@ -116,7 +116,7 @@ const char *Process::_priv_pd_args(Parent_capability parent_cap, enum { ENV_STR_LEN = 256 }; static char envbuf[5][ENV_STR_LEN]; Genode::snprintf(envbuf[0], ENV_STR_LEN, "parent_tid=%ld", - parent_cap.tid()); + parent_cap.dst()); Genode::snprintf(envbuf[1], ENV_STR_LEN, "parent_local_name=%lu", parent_cap.local_name()); Genode::snprintf(envbuf[2], ENV_STR_LEN, "DISPLAY=%s", diff --git a/base-linux/src/core/include/cap_session_component.h b/base-linux/src/core/include/cap_session_component.h index b09cd131c..95e7bd733 100644 --- a/base-linux/src/core/include/cap_session_component.h +++ b/base-linux/src/core/include/cap_session_component.h @@ -37,7 +37,7 @@ namespace Genode { { Lock::Guard lock_guard(_lock()); - return Native_capability(ep.tid(), ++_unique_id_cnt); + return Native_capability(ep.dst(), ++_unique_id_cnt); } void free(Native_capability cap) { } diff --git a/base-mb/src/base/ipc/ipc.cc b/base-mb/src/base/ipc/ipc.cc index 2980dea7e..dc4df45ea 100755 --- a/base-mb/src/base/ipc/ipc.cc +++ b/base-mb/src/base/ipc/ipc.cc @@ -130,7 +130,7 @@ void Ipc_client::_call() unsigned request_size = _write_offset; copy_msgbuf_to_utcb(_snd_msg, request_size, _dst.local_name()); - unsigned reply_size = Kernel::ipc_request(_dst.tid(), request_size); + unsigned reply_size = Kernel::ipc_request(_dst.dst(), request_size); copy_utcb_to_msgbuf(reply_size, _rcv_msg); diff --git a/base-mb/src/base/pager/pager.cc b/base-mb/src/base/pager/pager.cc index 05d83f194..0880b7b7c 100644 --- a/base-mb/src/base/pager/pager.cc +++ b/base-mb/src/base/pager/pager.cc @@ -104,7 +104,7 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) /* return invalid capability if no activation is present */ if (!_activation) return Pager_capability(); - Native_capability cap = Native_capability(_activation->cap().tid(), obj->badge()); + Native_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-mb/src/core/platform_thread.cc b/base-mb/src/core/platform_thread.cc index 2ff522f48..8e51b1abc 100755 --- a/base-mb/src/core/platform_thread.cc +++ b/base-mb/src/core/platform_thread.cc @@ -96,7 +96,7 @@ int Platform_thread::state(Thread_state *state_dst) int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no) { - Native_thread_id pager_tid = _pager ? _pager->cap().tid() : 0; + Native_thread_id pager_tid = _pager ? _pager->cap().dst() : 0; Kernel::Utcb* putcb = physical_utcb(_tid); /* Hand over arguments for the thread's bootstrap */ diff --git a/base-nova/include/base/ipc.h b/base-nova/include/base/ipc.h index 05602848b..7095cc98b 100644 --- a/base-nova/include/base/ipc.h +++ b/base-nova/include/base/ipc.h @@ -21,7 +21,7 @@ inline void Genode::Ipc_ostream::_marshal_capability(Genode::Native_capability c { long unique_id = cap.local_name(); _write_to_buf(unique_id); - _snd_msg->snd_append_pt_sel(cap.tid()); + _snd_msg->snd_append_pt_sel(cap.dst()); } diff --git a/base-nova/include/signal_session/source_client.h b/base-nova/include/signal_session/source_client.h index b8c462766..1c6e7bea2 100644 --- a/base-nova/include/signal_session/source_client.h +++ b/base-nova/include/signal_session/source_client.h @@ -67,7 +67,7 @@ namespace Genode { _init_sem(); /* block on semaphore, will be unblocked if signal is available */ - Nova::sm_ctrl(_sem.tid(), Nova::SEMAPHORE_DOWN); + Nova::sm_ctrl(_sem.dst(), Nova::SEMAPHORE_DOWN); /* * Now that the server has unblocked the semaphore, we are sure diff --git a/base-nova/src/base/ipc/ipc.cc b/base-nova/src/base/ipc/ipc.cc index 455f0c9ad..1bd3d955c 100644 --- a/base-nova/src/base/ipc/ipc.cc +++ b/base-nova/src/base/ipc/ipc.cc @@ -138,9 +138,9 @@ void Ipc_client::_call() _rcv_msg->rcv_prepare_pt_sel_window(utcb); /* establish the mapping via a portal traversal */ - if (_dst.tid() == 0) + if (_dst.dst() == 0) PWRN("destination portal is zero"); - int res = Nova::call(_dst.tid()); + int res = Nova::call(_dst.dst()); if (res) PERR("call returned %d", res); diff --git a/base-nova/src/base/thread/thread_nova.cc b/base-nova/src/base/thread/thread_nova.cc index 8be0fa43c..1cca47923 100644 --- a/base-nova/src/base/thread/thread_nova.cc +++ b/base-nova/src/base/thread/thread_nova.cc @@ -49,7 +49,7 @@ static void request_event_portal(Pager_capability pager_cap, utcb->set_msg_word(1); utcb->crd_rcv = Obj_crd(exc_base + event, 0); - int res = call(pager_cap.tid()); + int res = call(pager_cap.dst()); if (res) PERR("request of event (%d) capability selector failed", event); diff --git a/base-nova/src/core/include/cap_session_component.h b/base-nova/src/core/include/cap_session_component.h index 410c2f855..a9a56f802 100644 --- a/base-nova/src/core/include/cap_session_component.h +++ b/base-nova/src/core/include/cap_session_component.h @@ -38,7 +38,7 @@ namespace Genode { { Lock::Guard lock_guard(_lock()); - return Native_capability(ep.tid(), ++_unique_id_cnt); + return Native_capability(ep.dst(), ++_unique_id_cnt); } void free(Native_capability cap) { } diff --git a/base-nova/src/core/include/platform_pd.h b/base-nova/src/core/include/platform_pd.h index ac71b20de..f2700a029 100644 --- a/base-nova/src/core/include/platform_pd.h +++ b/base-nova/src/core/include/platform_pd.h @@ -63,7 +63,7 @@ namespace Genode { /** * Return portal capability selector for parent interface */ - int parent_pt_sel() { return _parent.tid(); } + int parent_pt_sel() { return _parent.dst(); } /** * Assign PD selector to PD diff --git a/base-nova/src/core/signal_source_component.cc b/base-nova/src/core/signal_source_component.cc index 8226c9ced..f8314419d 100644 --- a/base-nova/src/core/signal_source_component.cc +++ b/base-nova/src/core/signal_source_component.cc @@ -40,7 +40,7 @@ void Signal_source_component::submit(Signal_context_component *context, _signal_queue.enqueue(context); /* wake up client */ - Nova::sm_ctrl(_blocking_semaphore.tid(), Nova::SEMAPHORE_UP); + Nova::sm_ctrl(_blocking_semaphore.dst(), Nova::SEMAPHORE_UP); } } diff --git a/base-okl4/src/base/ipc/ipc.cc b/base-okl4/src/base/ipc/ipc.cc index 0d3146263..ac48576f6 100644 --- a/base-okl4/src/base/ipc/ipc.cc +++ b/base-okl4/src/base/ipc/ipc.cc @@ -104,7 +104,7 @@ void Ipc_ostream::_send() _dst.local_name()); /* perform IPC send operation */ - L4_MsgTag_t rcv_tag = L4_Send(_dst.tid()); + L4_MsgTag_t rcv_tag = L4_Send(_dst.dst()); if (L4_IpcFailed(rcv_tag)) { PERR("ipc error in _send."); @@ -186,7 +186,7 @@ void Ipc_client::_call() _dst.local_name()); L4_Accept(L4_UntypedWordsAcceptor); - L4_MsgTag_t rcv_tag = L4_Call(_dst.tid()); + L4_MsgTag_t rcv_tag = L4_Call(_dst.dst()); enum { ERROR_MASK = 0xe, ERROR_CANCELED = 3 << 1 }; if (L4_IpcFailed(rcv_tag) && @@ -244,7 +244,7 @@ void Ipc_server::_reply() _dst.local_name()); /* perform non-blocking IPC send operation */ - L4_MsgTag_t rcv_tag = L4_Reply(_dst.tid()); + L4_MsgTag_t rcv_tag = L4_Reply(_dst.dst()); if (L4_IpcFailed(rcv_tag)) PERR("ipc error in _reply - gets ignored"); @@ -261,7 +261,7 @@ void Ipc_server::_reply_wait() copy_msgbuf_to_utcb(_snd_msg, _write_offset/sizeof(L4_Word_t), _dst.local_name()); - L4_MsgTag_t rcv_tag = L4_ReplyWait(_dst.tid(), &_rcv_cs); + L4_MsgTag_t rcv_tag = L4_ReplyWait(_dst.dst(), &_rcv_cs); /* * TODO: Check for IPC error diff --git a/base-okl4/src/base/pager/pager.cc b/base-okl4/src/base/pager/pager.cc index 98b7c2289..79a0ea145 100644 --- a/base-okl4/src/base/pager/pager.cc +++ b/base-okl4/src/base/pager/pager.cc @@ -109,7 +109,7 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) /* return invalid capability if no activation is present */ if (!_activation) return Pager_capability(); - Native_capability cap = Native_capability(_activation->cap().tid(), obj->badge()); + Native_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-okl4/src/core/platform_thread.cc b/base-okl4/src/core/platform_thread.cc index 7c604bf79..7fd973b4a 100644 --- a/base-okl4/src/core/platform_thread.cc +++ b/base-okl4/src/core/platform_thread.cc @@ -55,7 +55,7 @@ int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no) _thread_id); L4_SpaceId_t space_id = L4_SpaceId(space_no); L4_ThreadId_t scheduler = L4_rootserver; - L4_ThreadId_t pager = _pager ? _pager->cap().tid() : L4_nilthread; + L4_ThreadId_t pager = _pager ? _pager->cap().dst() : L4_nilthread; L4_ThreadId_t exception_handler = pager; L4_Word_t resources = 0; L4_Word_t utcb_size_per_task = L4_GetUtcbSize()*(1 << Thread_id_bits::THREAD); diff --git a/base-pistachio/src/base/ipc/ipc.cc b/base-pistachio/src/base/ipc/ipc.cc index ea27ac33f..c7ec8b2e3 100644 --- a/base-pistachio/src/base/ipc/ipc.cc +++ b/base-pistachio/src/base/ipc/ipc.cc @@ -47,7 +47,7 @@ using namespace Pistachio; void Ipc_ostream::_send() { - IPCDEBUG("_send to 0x%08lx.\n", _dst.tid().raw); + IPCDEBUG("_send to 0x%08lx.\n", _dst.dst().raw); L4_Msg_t msg; L4_StringItem_t sitem = L4_StringItem(_write_offset, _snd_msg->buf); @@ -59,7 +59,7 @@ void Ipc_ostream::_send() L4_Append(&msg, sitem); L4_Load(&msg); - L4_MsgTag_t result = L4_Send(_dst.tid()); + L4_MsgTag_t result = L4_Send(_dst.dst()); /* * Error indicator @@ -208,7 +208,7 @@ void Ipc_client::_call() L4_Append(&msg, sitem); L4_Load(&msg); - L4_MsgTag_t result = L4_Call(_dst.tid()); + L4_MsgTag_t result = L4_Call(_dst.dst()); _write_offset = _read_offset = sizeof(umword_t); @@ -266,7 +266,7 @@ void Ipc_server::_reply() L4_Append(&msg, sitem); L4_Load(&msg); - L4_MsgTag_t result = L4_Reply(_dst.tid()); + L4_MsgTag_t result = L4_Reply(_dst.dst()); if (L4_IpcFailed(result)) PERR("ipc error in _reply, ignored"); @@ -298,7 +298,7 @@ void Ipc_server::_reply_wait() L4_Accept(L4_UntypedWordsAcceptor); L4_Accept(L4_StringItemsAcceptor, &msgbuf); - L4_MsgTag_t result = L4_Ipc(_dst.tid(), L4_anythread, L4_Timeouts(L4_ZeroTime, L4_Never), &_rcv_cs); + L4_MsgTag_t result = L4_Ipc(_dst.dst(), L4_anythread, L4_Timeouts(L4_ZeroTime, L4_Never), &_rcv_cs); IPCDEBUG("Got something from 0x%x.\n", L4_ThreadNo(L4_GlobalId(_rcv_cs))); /* error handling - check whether send or receive failed */ diff --git a/base-pistachio/src/base/pager/pager.cc b/base-pistachio/src/base/pager/pager.cc index 04ea44df1..bb5dfdc6a 100644 --- a/base-pistachio/src/base/pager/pager.cc +++ b/base-pistachio/src/base/pager/pager.cc @@ -107,7 +107,7 @@ Pager_capability Pager_entrypoint::manage(Pager_object *obj) /* return invalid capability if no activation is present */ if (!_activation) return Pager_capability(); - Native_capability cap = Native_capability(_activation->cap().tid(), obj->badge()); + Native_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); /* add server object to object pool */ obj->cap(cap); diff --git a/base-pistachio/src/core/platform_thread.cc b/base-pistachio/src/core/platform_thread.cc index 96290c4ec..4b27281ce 100644 --- a/base-pistachio/src/core/platform_thread.cc +++ b/base-pistachio/src/core/platform_thread.cc @@ -54,7 +54,7 @@ void Platform_thread::set_cpu(unsigned int cpu_no) int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no) { L4_ThreadId_t thread = _l4_thread_id; - L4_ThreadId_t pager = _pager ? _pager->cap().tid() : L4_nilthread; + L4_ThreadId_t pager = _pager ? _pager->cap().dst() : L4_nilthread; /* XXX should always be the root task */ L4_ThreadId_t preempter = L4_Myself(); diff --git a/base/include/base/native_capability.h b/base/include/base/native_capability.h index 02ab65d8e..2144f268b 100644 --- a/base/include/base/native_capability.h +++ b/base/include/base/native_capability.h @@ -110,7 +110,7 @@ namespace Genode { /** * Return the kernel-specific capability destination */ - Dst tid() const { return _tid; } + Dst dst() const { return _tid; } }; } diff --git a/base/src/base/server/server.cc b/base/src/base/server/server.cc index 8f9410c90..6eae3affa 100644 --- a/base/src/base/server/server.cc +++ b/base/src/base/server/server.cc @@ -27,7 +27,7 @@ using namespace Genode; Untyped_capability Rpc_entrypoint::_manage(Rpc_object_base *obj) { - Untyped_capability ep_cap = Native_capability(_cap.tid(), 0); + Untyped_capability ep_cap = Native_capability(_cap.dst(), 0); Untyped_capability new_obj_cap = _cap_session->alloc(ep_cap); /* add server object to object pool */ diff --git a/base/src/core/include/cap_session_component.h b/base/src/core/include/cap_session_component.h index 908916f3a..7bf4981c5 100644 --- a/base/src/core/include/cap_session_component.h +++ b/base/src/core/include/cap_session_component.h @@ -37,7 +37,7 @@ namespace Genode { { Lock::Guard lock_guard(_lock()); - return Native_capability(ep.tid(), ++_unique_id_cnt); + return Native_capability(ep.dst(), ++_unique_id_cnt); } void free(Native_capability cap) { }