typename Inspector::result_type inspect(Inspector& f, strong_actor_ptr& x) {
  actor_id aid = 0;
  node_id nid;
  if (x) {
    aid = x->aid;
    nid = x->nid;
  }
  auto load = [&] { return load_actor(x, context_of(&f), aid, nid); };
  auto save = [&] { return save_actor(x, context_of(&f), aid, nid); };
  return f(meta::type_name("actor"), aid,
           meta::omittable_if_none(), nid,
           meta::load_callback(load), meta::save_callback(save));
}
Example #2
0
IMPLEMENT_DEFAULT
Thread *
Jdb::get_thread(Cpu_number cpu)
{
  Jdb_entry_frame *c = get_entry_frame(cpu);

  return static_cast<Thread*>(context_of(c));
}
Receiver *
IPC_timeout::owner()
{
  // We could have saved our context in our constructor, but computing
  // it this way is easier and saves space. We can do this as we know
  // that IPC_timeouts are always created on the kernel stack of the
  // owner context.

  return reinterpret_cast<Receiver *>(context_of (this));
}
Example #4
0
//---------------------------------------------------------------------------
IMPLEMENTATION [arm || ux || ppc32 || sparc || mips32]:

#include "mem_layout.h"

IMPLEMENT
Thread *
Jdb::get_thread(Cpu_number cpu)
{
  Jdb_entry_frame *c = get_entry_frame(cpu);

  return static_cast<Thread*>(context_of(c));
}
 Context *context() const { return context_of(this); }