PUBLIC L4_msg_tag Irq_muxer::kinvoke(L4_obj_ref, L4_fpage::Rights /*rights*/, Syscall_frame *f, Utcb const *utcb, Utcb *) { register Context *const c_thread = ::current(); assert_opt (c_thread); register Space *const c_space = c_thread->space(); assert_opt (c_space); L4_msg_tag tag = f->tag(); if (EXPECT_FALSE(tag.proto() != L4_msg_tag::Label_irq)) return commit_result(-L4_err::EBadproto); if (EXPECT_FALSE(tag.words() < 1)) return commit_result(-L4_err::EInval); switch ((utcb->values[0] & 0xffff)) { case Op_chain: return sys_attach(tag, utcb, f, c_space); case Op_trigger: log(); hit(0); return no_reply(); default: return commit_result(-L4_err::EInval); } }
PUBLIC L4_msg_tag Vlog::kinvoke(L4_obj_ref ref, Mword rights, Syscall_frame *f, Utcb const *r_msg, Utcb *s_msg) { L4_msg_tag const t = f->tag(); if (t.proto() == L4_msg_tag::Label_irq) return Icu_h<Vlog>::icu_invoke(ref, rights, f, r_msg, s_msg); else if (t.proto() != L4_msg_tag::Label_log) return commit_result(-L4_err::EBadproto); switch (r_msg->values[0]) { case 0: log_string(f, r_msg); return no_reply(); case 2: // set attr return set_attr(rights, f, r_msg); case 3: // get attr return get_attr(rights, f, s_msg); default: return get_input(rights, f, s_msg); } }