Loading...
Searching...
No Matches
inhibitor
// vim:set ft=cpp: -*- Mode: C++ -*-
/*
* (c) 2014 Steffen Liebergeld <steffen.liebergeld@kernkonzept.com>
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/capability>
#include <l4/sys/cxx/ipc_iface>
#include <l4/sys/cxx/ipc_string>
#include <l4/re/protocols.h>
namespace L4Re {
class Inhibitor :
public L4::Kobject_t<Inhibitor, L4::Kobject, L4RE_PROTO_INHIBITOR>
{
public:
enum
{
Name_max = 20
};
L4_INLINE_RPC(long, acquire, (l4_umword_t id, L4::Ipc::String<> reason));
L4_INLINE_RPC(long, release, (l4_umword_t id));
long next_lock_info(char *name, unsigned len, l4_mword_t current_id = -1,
l4_utcb_t *utcb = l4_utcb())
{
L4::Ipc::String<char> name_buf(len , name);
long r = next_lock_info_t::call(c(), &current_id, name_buf, utcb);
if (r < 0)
return r;
return current_id;
}
L4_INLINE_RPC_NF(long, next_lock_info, (L4::Ipc::In_out<l4_mword_t *> current_id,
L4::Ipc::String<char> &name));
typedef L4::Typeid::Rpcs<acquire_t, release_t, next_lock_info_t> Rpcs;
};
}
capability
L4::Cap related definitions.
L4Re::Inhibitor
Set of inhibitor locks, which inhibit specific actions when held.
Definition inhibitor:40
L4Re::Inhibitor::Name_max
@ Name_max
The maximum length of a lock's name.
Definition inhibitor:44
L4Re::Inhibitor::next_lock_info
long next_lock_info(char *name, unsigned len, l4_mword_t current_id=-1, l4_utcb_t *utcb=l4_utcb())
Get information for the next available inhibitor lock.
Definition inhibitor:84
L4Re::Inhibitor::acquire
long acquire(l4_umword_t id, L4::Ipc::String<> reason)
Acquire a specific inhibitor lock.
L4Re::Inhibitor::release
long release(l4_umword_t id)
Release a specific inhibitor lock.
L4::Kobject_t
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
L4::Kobject_t< Inhibitor, L4::Kobject, L4RE_PROTO_INHIBITOR >::c
L4::Cap< Class > c() const noexcept
Definition __typeinfo.h:769
l4_umword_t
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
l4_mword_t
signed long l4_mword_t
Signed machine word.
Definition l4int.h:37
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
l4_utcb
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:346
ipc_iface
Interface Definition Language.
L4_INLINE_RPC
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
Definition ipc_iface:482
L4_INLINE_RPC_NF
#define L4_INLINE_RPC_NF(res, name, args...)
Define an inline RPC call type (the type only, no callable).
Definition ipc_iface:453
L4Re
L4Re C++ Interfaces.
Definition cmd_control:14
protocols.h
L4Re Protocol Constants (C version).
L4::Ipc::In_out
Mark an argument as in-out argument.
Definition ipc_types:42
L4::Typeid::Rpcs
Standard list of RPCs of an interface.
Definition __typeinfo.h:428