}
// this should always succeed either because there are local
// copies or because the cap is now foreign
+ DEBUG_CAPOPS("%s st=%p, cap = %#"PRIxCADDR"\n", __FUNCTION__,
+ rpc_st, get_cap_addr(rpc_st->cap));
err = cap_destroy(rpc_st->cap);
- PANIC_IF_ERR(err, "cap_destroy after give_away failed");
+ PANIC_IF_ERR(err, "cap_destroy after give_away failed (st=%p)", rpc_st);
+ } else if (err_is_ok(status)) {
+ debug_printf("copy succeeded but we're leaving monitor's copy alone?\n");
}
}
// call result handler
genvaddr_t st)
{
assert(st);
- DEBUG_CAPOPS("recv_copy_result__rx: %p, %s\n", b, err_getstring(status));
+ DEBUG_CAPOPS("recv_copy_result__rx: %p, st=%p, %s\n", b, (void*)st,
+ err_getstring(status));
struct cap_copy_rpc_st *rpc_st = (struct cap_copy_rpc_st*)((lvaddr_t)st);
rpc_st->recv_handler(status, capaddr, level, slot, rpc_st);
}
}
else {
// forward copy to destination core
+ DEBUG_CAPOPS("%s: owner_copy__enq(st=%p) capref = %#"PRIxCADDR"\n",
+ __FUNCTION__, (void *)st, get_cap_addr(capref));
owner_copy__enq(capref, &cap, from, dest, true, NULL, st);
}
if (capref_is_null(capref)) {
memset(&cap, sizeof(cap), 0);
cap.type = ObjType_Null;
+ DEBUG_CAPOPS("%s: owner_copy__enq(st=%p) capref = %#"PRIxCADDR"\n",
+ __FUNCTION__, st, get_cap_addr(capref));
owner_copy__enq(capref, &cap, my_core_id, dest, give_away,
result_handler, (lvaddr_t)st);
return;
DEBUG_CAPOPS("capops_copy: sending copy from non-owner, forward request to owner\n");
// sending copy from non-owner, send copy request to owner
+ DEBUG_CAPOPS("%s: request_copy__enq(st=%p) capref = %#"PRIxCADDR"\n",
+ __FUNCTION__, st, get_cap_addr(capref));
request_copy__enq(capref, dest, give_away, result_handler, st);
} else {
DEBUG_CAPOPS("capops_copy: sending copy from here/owner\n");
// sending copy from here/owner
+ DEBUG_CAPOPS("%s: owner_copy__enq(st=%p) capref = %#"PRIxCADDR"\n",
+ __FUNCTION__, st, get_cap_addr(capref));
owner_copy__enq(capref, &cap, my_core_id, dest, give_away,
result_handler, (lvaddr_t)st);
}