Rename tid() to dst() in Native_capability.

As suggested by Norman in the discussion of issue #145, this commit
renames the tid() accessor in Native_capability to dst().
This commit is contained in:
Stefan Kalkowski 2012-03-09 12:25:11 +01:00 committed by Norman Feske
parent 84ca4b25db
commit ae8cf5f44d
43 changed files with 85 additions and 85 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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<l4_umword_t *>(&_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<l4_umword_t *>(&_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<l4_umword_t *>(&_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<l4_umword_t *>(&_snd_msg->buf[sizeof(umword_t)]),

View File

@ -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);

View File

@ -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;

View File

@ -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());
}

View File

@ -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

View File

@ -51,7 +51,7 @@ namespace Genode {
/* request mapping of semaphore capability selector */
_sem = call<Rpc_request_semaphore>();
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

View File

@ -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))

View File

@ -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,

View File

@ -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());

View File

@ -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(); }
};
}

View File

@ -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; }

View File

@ -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();
}

View File

@ -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");

View File

@ -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(), &params);
l4_scheduler_run_thread(L4_BASE_SCHEDULER_CAP, _thread_cap.dst(), &params);
}
@ -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);
}

View File

@ -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());
}
}

View File

@ -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<Cpu_thread>(pt->thread_cap());
pt->pager(platform_specific()->core_pager());

View File

@ -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);

View File

@ -56,7 +56,7 @@ namespace Genode {
static IF *deref(Capability<IF> 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();
/*

View File

@ -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();
}

View File

@ -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",

View File

@ -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) { }

View File

@ -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);

View File

@ -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);

View File

@ -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 */

View File

@ -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());
}

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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) { }

View File

@ -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

View File

@ -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);
}
}

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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();

View File

@ -110,7 +110,7 @@ namespace Genode {
/**
* Return the kernel-specific capability destination
*/
Dst tid() const { return _tid; }
Dst dst() const { return _tid; }
};
}

View File

@ -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 */

View File

@ -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) { }