Loading...
Searching...
No Matches
ipc_legacy
// vi:set ft=cpp: -*- Mode: C++ -*-
/*
* Copyright (C) 2015, 2017, 2024 Kernkonzept GmbH.
* Author(s): Alexander Warg <alexander.warg@kernkonzept.com>
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/cxx/ipc_epiface>
#ifndef L4_RPC_DISABLE_LEGACY_DISPATCH
#define L4_RPC_LEGACY_DISPATCH(IFACE) \
template<typename IOS> \
int dispatch(unsigned rights, IOS &ios) \
{ \
typedef ::L4::Ipc::Detail::Dispatch<IFACE> Dispatch; \
l4_msgtag_t r = Dispatch::f(this, ios.tag(), rights, ios.utcb()); \
ios.set_ipc_params(r); \
return r.label(); \
} \
\
template<typename IOS> \
int p_dispatch(IFACE *, unsigned rights, IOS &ios) \
{ \
using ::L4::Ipc::Msg::dispatch_call; \
l4_msgtag_t r; \
r = dispatch_call<typename IFACE::Rpcs>(this, ios.utcb(), \
ios.tag(), rights); \
ios.set_ipc_params(r); \
return r.label(); \
}
#define L4_RPC_LEGACY_USING(IFACE) \
using IFACE::p_dispatch
#else
#define L4_RPC_LEGACY_DISPATCH(IFACE)
#define L4_RPC_LEGACY_USING(IFACE)
#endif