base/os: remove deprecated APIs

This commit removes APIs that were previously marked as deprecated. This
change has the following implications:

- The use of the global 'env()' accessor is not possible anymore.
- Boolean accessor methods are no longer prefixed with 'is_'. E.g.,
  instead of 'is_valid()', use 'valid()'.
- The last traces of 'Ram_session' are gone now. The 'Env::ram()'
  accessor returns the 'Ram_allocator' interface, which is a subset of
  the 'Pd_session' interface.
- All connection constructors need the 'Env' as argument.
- The 'Reporter' constructor needs an 'Env' argument now because the
  reporter creates a report connection.
- The old overload 'Child_policy::resolve_session_request' that returned
  a 'Service' does not exist anymore.
- The base/printf.h header has been removed, use base/log.h instead.
- The old notion of 'Signal_dispatcher' is gone. Use 'Signal_handler'.
- Transitional headers like os/server.h, cap_session/,
  volatile_object.h, os/attached*_dataspace.h, signal_rpc_dispatcher.h
  have been removed.
- The distinction between 'Thread_state' and 'Thread_state_base' does
  not exist anymore.
- The header cpu_thread/capability.h along with the type definition of
  'Cpu_thread_capability' has been removed. Use the type
  'Thread_capability' define in cpu_session/cpu_session.h instead.
- Several XML utilities (i.e., at os/include/decorator) could be removed
  because their functionality is nowadays covered by util/xml_node.h.
- The 'os/ram_session_guard.h' has been removed.
  Use 'Constrained_ram_allocator' provided by base/ram_allocator.h instead.

Issue #1987
This commit is contained in:
Norman Feske 2019-01-30 17:27:46 +01:00 committed by Christian Helmuth
parent ffeb8e2af0
commit 5ed5fddb7c
102 changed files with 198 additions and 2275 deletions

View File

@ -200,7 +200,7 @@ Genode::Pager_object &Platform_thread::pager()
Thread_state Platform_thread::state()
{
Thread_state_base bstate(*_kobj.kernel_object()->regs);
Thread_state bstate(*_kobj.kernel_object()->regs);
return Thread_state(bstate);
}

View File

@ -133,9 +133,7 @@ class Genode::Platform_env : public Platform_env_base
** Env_deprecated interface **
******************************/
Parent *parent() override { return &_parent(); }
Allocator *heap() override { return &_heap; }
Parent *parent() override { return &_parent(); }
};
#endif /* _INCLUDE__BASE__INTERNAL__PLATFORM_ENV_H_ */

View File

@ -52,7 +52,7 @@ void Child::Initial_thread::start(addr_t) { }
*/
Child::Process::Loaded_executable::Loaded_executable(Type,
Dataspace_capability,
Ram_session &,
Ram_allocator &,
Region_map &,
Region_map &,
Parent_capability) { }

View File

@ -164,12 +164,6 @@ struct Genode::Range_allocator : Allocator
bool ok() const { return value == OK; }
bool error() const { return !ok(); }
/*
* \deprecated use 'ok' and 'error' instead
*/
bool is_ok() const { return ok(); }
bool is_error() const { return error(); }
};
/**

View File

@ -338,7 +338,7 @@ class Genode::Allocator_avl_tpl : public Allocator_avl_base
explicit Allocator_avl_tpl(Allocator *metadata_chunk_alloc) :
Allocator_avl_base(&_metadata, sizeof(Block)),
_metadata((metadata_chunk_alloc) ? metadata_chunk_alloc : this,
(Slab_block *)&_initial_md_block) { }
(Block *)&_initial_md_block) { }
~Allocator_avl_tpl() { _revert_allocations_and_ranges(); }

View File

@ -63,16 +63,6 @@ class Genode::Attached_dataspace : Noncopyable
Attached_dataspace(Region_map &rm, Dataspace_capability ds)
: _ds(_check(ds)), _rm(rm), _local_addr(_rm.attach(_ds)) { }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Region_map &' as first
* argument instead
*/
Attached_dataspace(Dataspace_capability ds) __attribute__((deprecated))
: _ds(_check(ds)), _rm(*env_deprecated()->rm_session()), _local_addr(_rm.attach(_ds)) { }
/**
* Destructor
*/

View File

@ -31,16 +31,15 @@ class Genode::Attached_io_mem_dataspace
{
private:
/*
* Noncopyable
*/
Attached_io_mem_dataspace(Attached_io_mem_dataspace const &);
Attached_io_mem_dataspace &operator = (Attached_io_mem_dataspace const &);
Region_map &_env_rm;
Io_mem_connection _mmio;
Io_mem_dataspace_capability _ds;
Region_map::Local_addr _local_addr;
Region_map &_env_rm;
Io_mem_connection _mmio;
Io_mem_dataspace_capability _ds;
void *_local_addr;
static void *_with_sub_page_offset(void *local, addr_t io_base)
{
return (void *)((addr_t)local | (io_base & (addr_t)0xfff));
}
public:
@ -65,30 +64,8 @@ class Genode::Attached_io_mem_dataspace
_env_rm(env.rm()),
_mmio(env, base, size, write_combined),
_ds(_mmio.dataspace()),
_local_addr(env.rm().attach(_ds))
{
/* apply sub-page offset to virtual address */
_local_addr = (void *)((addr_t)_local_addr | (base & (addr_t)0xfff));
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Attached_io_mem_dataspace(Genode::addr_t base, Genode::size_t size,
bool write_combined = false) __attribute__((deprecated))
:
_env_rm(*env_deprecated()->rm_session()),
_mmio(false, base, size, write_combined),
_ds(_mmio.dataspace()),
_local_addr(_env_rm.attach(_ds))
{
/* apply sub-page offset to virtual address */
_local_addr = (void *)((addr_t)_local_addr | (base & (addr_t)0xfff));
}
_local_addr(_with_sub_page_offset(env.rm().attach(_ds), base))
{ }
/**
* Destructor

View File

@ -107,21 +107,6 @@ class Genode::Attached_ram_dataspace
_alloc_and_attach();
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with the 'Ram_allocator &' and
* 'Region_map &' arguments instead.
*/
Attached_ram_dataspace(Ram_allocator *ram, size_t size,
Cache_attribute cached = CACHED) __attribute__((deprecated))
:
_size(size), _ram(ram), _rm(env_deprecated()->rm_session()), _cached(cached)
{
_alloc_and_attach();
}
/**
* Destructor
*/

View File

@ -74,17 +74,6 @@ class Genode::Attached_rom_dataspace
Attached_rom_dataspace(Env &env, char const *name)
: _rm(env.rm()), _rom(env, name) { _try_attach(); }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Attached_rom_dataspace(char const *name) __attribute__((deprecated))
: _rm(*env_deprecated()->rm_session()), _rom(false /* deprecated */, name)
{ _try_attach(); }
/**
* Return capability of the used dataspace
*/
@ -129,14 +118,6 @@ class Genode::Attached_rom_dataspace
*/
bool valid() const { return _ds.constructed(); }
/**
* Return true of content is present
*
* \noapi
* \deprecated use 'valid' instead
*/
bool is_valid() const { return valid(); }
/**
* Return dataspace content as XML node
*

View File

@ -26,7 +26,6 @@
#include <cpu_session/connection.h>
#include <log_session/connection.h>
#include <rom_session/connection.h>
#include <ram_session/capability.h>
#include <parent/capability.h>
namespace Genode {
@ -66,20 +65,6 @@ struct Genode::Child_policy
*/
virtual Linker_name linker_name() const { return "ld.lib.so"; }
/**
* Determine service to provide a session request
*
* \return service to be contacted for the new session
* \deprecated
*
* \throw Service_denied
*/
virtual Service &resolve_session_request(Service::Name const &,
Session_state::Args const &)
{
throw Service_denied();
}
/**
* Routing destination of a session request
*/
@ -98,11 +83,7 @@ struct Genode::Child_policy
* \throw Service_denied
*/
virtual Route resolve_session_request(Service::Name const &,
Session_label const &)
{
/* \deprecated make pure virtual once the old version is gone */
throw Service_denied();
}
Session_label const &) = 0;
/**
* Apply transformations to session arguments
@ -336,9 +317,6 @@ class Genode::Child : protected Rpc_object<Parent>,
typedef Session_state::Args Args;
static Child_policy::Route _resolve_session_request(Child_policy &,
Service::Name const &,
char const *);
/*
* Members that are initialized not before the child's environment is
* complete.
@ -381,7 +359,7 @@ class Genode::Child : protected Rpc_object<Parent>,
*/
Loaded_executable(Type type,
Dataspace_capability ldso_ds,
Ram_session &ram,
Ram_allocator &ram,
Region_map &local_rm,
Region_map &remote_rm,
Parent_capability parent_cap);
@ -512,7 +490,7 @@ class Genode::Child : protected Rpc_object<Parent>,
/**
* Service (Ram_transfer::Account) interface
*/
void transfer(Ram_session_capability to, Ram_quota amount) override
void transfer(Pd_session_capability to, Ram_quota amount) override
{
Ram_transfer::Account &from = _service;
from.transfer(to, amount);
@ -521,7 +499,7 @@ class Genode::Child : protected Rpc_object<Parent>,
/**
* Service (Ram_transfer::Account) interface
*/
Ram_session_capability cap(Ram_quota) const override
Pd_session_capability cap(Ram_quota) const override
{
Ram_transfer::Account &to = _service;
return to.cap(Ram_quota());
@ -596,9 +574,8 @@ class Genode::Child : protected Rpc_object<Parent>,
try {
Child_policy::Route const route =
_child._resolve_session_request(_child._policy,
_service_name(),
_args.string());
_child._policy.resolve_session_request(_service_name(),
label_from_args(_args.string()));
_env_service.construct(_child, route.service);
_connection.construct(*_env_service, _child._id_space, _client_id,
_args, _child._policy.filter_session_affinity(Affinity()),
@ -772,16 +749,15 @@ class Genode::Child : protected Rpc_object<Parent>,
return _effective_quota(quota, env_cap_quota());
}
Ram_session_capability ram_session_cap() const { return _pd.cap(); }
Pd_session_capability pd_session_cap() const { return _pd.cap(); }
Pd_session_capability pd_session_cap() const { return _pd.cap(); }
Parent_capability parent_cap() const { return cap(); }
Ram_session &ram() { return _pd.session(); }
Ram_session const &ram() const { return _pd.session(); }
Cpu_session &cpu() { return _cpu.session(); }
Pd_session &pd() { return _pd .session(); }
Pd_session const &pd() const { return _pd .session(); }
Ram_allocator &ram() { return _pd.session(); }
Ram_allocator const &ram() const { return _pd.session(); }
Cpu_session &cpu() { return _cpu.session(); }
Pd_session &pd() { return _pd.session(); }
Pd_session const &pd() const { return _pd.session(); }
/**
* Request factory for creating session-state objects

View File

@ -131,15 +131,6 @@ class Genode::Connection : public Connection_base
Connection_base(env), _cap(_request_cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(Capability<SESSION_TYPE>) : _cap(_request_cap()) { }
/**
* Destructor
*/
@ -175,37 +166,6 @@ class Genode::Connection : public Connection_base
_session(parent, affinity, format_args, list);
return Capability<SESSION_TYPE>();
}
/**
* Shortcut for env()->parent()->session()
*
* \noapi
* \deprecated to be removed along with Genode::env()
*/
Capability<SESSION_TYPE> session(const char *format_args, ...)
{
va_list list;
va_start(list, format_args);
_session(*env_deprecated()->parent(), Affinity(), format_args, list);
return Capability<SESSION_TYPE>();
}
/**
* Shortcut for env()->parent()->session()
*
* \noapi
* \deprecated to be removed along with Genode::env()
*/
Capability<SESSION_TYPE> session(Affinity const &affinity,
char const *format_args, ...)
{
va_list list;
va_start(list, format_args);
_session(affinity, format_args, list);
return Capability<SESSION_TYPE>();
}
};
#endif /* _INCLUDE__BASE__CONNECTION_H_ */

View File

@ -16,14 +16,8 @@
#include <parent/parent.h>
#include <base/entrypoint.h>
#include <ram_session/capability.h>
#include <cpu_session/capability.h>
#include <pd_session/capability.h>
#include <rm_session/rm_session.h>
/* maintain compatibility to deprecated API */
#include <deprecated/env.h>
namespace Genode { struct Env; }
@ -32,14 +26,6 @@ struct Genode::Env : Interface
{
virtual Parent &parent() = 0;
/**
* RAM allocator of the component
*
* The RAM allocator is backed with the RAM budget of the component's PD
* session. This budget can be used to allocate RAM dataspaces.
*/
virtual Ram_session &ram() { return pd(); }
/**
* CPU session of the component
*
@ -57,19 +43,16 @@ struct Genode::Env : Interface
*/
virtual Pd_session &pd() = 0;
/**
* Memory allocator
*/
Ram_allocator &ram() { return pd(); }
/**
* Entrypoint for handling RPC requests and signals
*/
virtual Entrypoint &ep() = 0;
/**
* Deprecated
*
* \deprecated the RAM session has become part of the PD session
* \noapi
*/
virtual Ram_session_capability ram_session_cap() { return pd_session_cap(); }
/**
* Return the CPU-session capability of the component
*/

View File

@ -22,7 +22,7 @@
#include <base/lock.h>
namespace Genode {
class Heap;
class Sliced_heap;
}
@ -196,15 +196,6 @@ class Genode::Sliced_heap : public Allocator
*/
static constexpr size_t meta_data_size() { return sizeof(Block); }
/**
* Constructor
*
* \deprecated Use the other constructor that takes reference
* arguments
*/
Sliced_heap(Ram_allocator *ram_alloc, Region_map *region_map)
: Sliced_heap(*ram_alloc, *region_map) { }
/**
* Constructor
*/

View File

@ -1,123 +0,0 @@
/*
* \brief Native capability template.
* \author Stefan Kalkowski
* \date 2011-03-07
*
* This file is a generic variant of the Native_capability, which is
* suitable many platforms such as Fiasco, Pistachio, OKL4, Linux,
* and some more.
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_
namespace Genode { template <typename> class Native_capability_tpl; }
/**
* Generic parts of the platform-specific 'Native_capability'
*
* \param POLICY policy class that provides the type used as capability
* destination and functions for checking the validity of
* the platform-specific destination type and for
* invalid destinations.
*
* The struct passed as 'POLICY' argument must have the following
* interface:
*
* ! typedef Dst;
* ! static bool valid(Dst dst);
* ! static Dst invalid();
*
* The 'Dst' type is the platform-specific destination type (e.g., the ID
* of the destination thread targeted by the capability). The 'valid'
* method returns true if the specified destination is valid. The
* 'invalid' method produces an invalid destination.
*/
template <typename POLICY>
class Genode::Native_capability_tpl
{
public:
typedef typename POLICY::Dst Dst;
/**
* Compound object used to copy raw capability members
*
* This type is a utility solely used to communicate the
* information about the parent capability from the parent to the
* new process.
*/
struct Raw { Dst dst; long local_name; };
private:
Dst _dst;
long _local_name;
protected:
/**
* Constructor for a local capability
*
* A local capability just encapsulates a pointer to some
* local object. This constructor is only used by a factory
* method for local-capabilities in the generic Capability
* class.
*
* \param ptr address of the local object
*/
Native_capability_tpl(void* ptr)
: _dst(POLICY::invalid()), _local_name((long)ptr) { }
public:
/**
* Constructor for an invalid capability
*/
Native_capability_tpl() : _dst(POLICY::invalid()), _local_name(0) { }
/**
* Publicly available constructor
*
* \param tid kernel-specific thread id
* \param local_name ID used as key to lookup the 'Rpc_object'
* that corresponds to the capability.
*/
Native_capability_tpl(Dst tid, long local_name)
: _dst(tid), _local_name(local_name) { }
/**
* Return true when the capability is valid
*/
bool valid() const { return POLICY::valid(_dst); }
/**
* Return ID used to lookup the 'Rpc_object' by its capability
*/
long local_name() const { return _local_name; }
/**
* Return pointer to object referenced by a local-capability
*/
void* local() const { return (void*)_local_name; }
/**
* Return capability destination
*/
Dst dst() const { return _dst; }
/**
* Return raw data representation of the capability
*/
Raw raw() const { return { _dst, _local_name }; }
};
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ */

View File

@ -1,90 +0,0 @@
/*
* \brief Interface of the printf back end
* \author Norman Feske
* \date 2006-04-08
*/
/*
* Copyright (C) 2006-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__BASE__PRINTF_H_
#define _INCLUDE__BASE__PRINTF_H_
#include <stdarg.h>
namespace Genode {
/**
* Output format string to LOG session
*/
void printf(const char *format, ...) __attribute__((format(printf, 1, 2)));
void vprintf(const char *format, va_list) __attribute__((format(printf, 1, 0)));
}
#define ESC_LOG "\033[33m"
#define ESC_DBG "\033[33m"
#define ESC_INF "\033[32m"
#define ESC_WRN "\033[34m"
#define ESC_ERR "\033[31m"
#define ESC_END "\033[0m"
/**
* Remove colored output from release version
*/
#ifdef GENODE_RELEASE
#undef ESC_LOG
#undef ESC_DBG
#undef ESC_INF
#undef ESC_WRN
#undef ESC_ERR
#undef ESC_END
#define ESC_LOG
#define ESC_DBG
#define ESC_INF
#define ESC_WRN
#define ESC_ERR
#define ESC_END
#endif /* GENODE_RELEASE */
/**
* Suppress debug messages in release version
*/
#ifdef GENODE_RELEASE
#define DO_PWRN false
#else
#define DO_PWRN true
#endif /* GENODE_RELEASE */
/**
* Print log message
*/
#define PLOG(fmt, ...) \
Genode::printf(ESC_LOG fmt ESC_END "\n", ##__VA_ARGS__ )
/**
* Print status-information message
*/
#define PINF(fmt, ...) \
Genode::printf(ESC_INF fmt ESC_END "\n", ##__VA_ARGS__ )
/**
* Print warning message
*/
#define PWRN(fmt, ...) \
do { \
if (DO_PWRN) \
Genode::printf(ESC_WRN fmt ESC_END "\n", ##__VA_ARGS__ ); \
} while (0)
/**
* Print error message
*/
#define PERR(fmt, ...) \
Genode::printf(ESC_ERR fmt ESC_END "\n", ##__VA_ARGS__ )
#endif /* _INCLUDE__BASE__PRINTF_H_ */

View File

@ -15,15 +15,14 @@
#define _INCLUDE__BASE__QUOTA_TRANSFER_H_
#include <base/capability.h>
#include <ram_session/ram_session.h>
#include <pd_session/pd_session.h>
namespace Genode {
template <typename SESSION, typename UNIT> class Quota_transfer;
typedef Quota_transfer<Ram_session, Ram_quota> Ram_transfer;
typedef Quota_transfer<Pd_session, Cap_quota> Cap_transfer;
typedef Quota_transfer<Pd_session, Ram_quota> Ram_transfer;
typedef Quota_transfer<Pd_session, Cap_quota> Cap_transfer;
}

View File

@ -110,14 +110,6 @@ class Genode::Rpc_in_buffer : public Rpc_in_buffer_base
bool valid_string() const {
return (_size <= MAX_SIZE) && (_size > 0) && (_base[_size - 1] == '\0'); }
/**
* Return true if buffer contains a valid null-terminated string
*
* \noapi
* \deprecated use valid_string instead
*/
bool is_valid_string() const { return valid_string(); }
/**
* Return buffer content as null-terminated string
*

View File

@ -198,13 +198,6 @@ class Genode::Rpc_client : public RPC_INTERFACE
return _cap.template call<IF>(args...);
}
/**
* Return RPC capablity for client object
*
* \deprecated use 'rpc_cap' accessor instead
*/
operator Capability<RPC_INTERFACE>() const { return _cap; }
Capability<RPC_INTERFACE> rpc_cap() const { return _cap; }
};

View File

@ -226,7 +226,6 @@ class Genode::Local_service : public Service
break;
}
}
};
@ -237,10 +236,6 @@ class Genode::Parent_service : public Service
{
private:
/*
* \deprecated
*/
Env &_env_deprecated();
Env &_env;
public:
@ -251,14 +246,6 @@ class Genode::Parent_service : public Service
Parent_service(Env &env, Service::Name const &name)
: Service(name), _env(env) { }
/**
* Constructor
*
* \deprecated
*/
Parent_service(Service::Name const &name)
: Service(name), _env(_env_deprecated()) { }
void initiate_request(Session_state &session) override
{
switch (session.phase) {
@ -430,7 +417,7 @@ class Genode::Child_service : public Async_service
/**
* Ram_transfer::Account interface
*/
void transfer(Ram_session_capability to, Ram_quota amount) override
void transfer(Pd_session_capability to, Ram_quota amount) override
{
if (to.valid()) _pd.transfer_quota(to, amount);
}
@ -438,7 +425,7 @@ class Genode::Child_service : public Async_service
/**
* Ram_transfer::Account interface
*/
Pd_session_capability cap(Ram_quota) const override { return _pd; }
Pd_session_capability cap(Ram_quota) const override { return _pd.rpc_cap(); }
/**
* Cap_transfer::Account interface
@ -451,7 +438,7 @@ class Genode::Child_service : public Async_service
/**
* Cap_transfer::Account interface
*/
Pd_session_capability cap(Cap_quota) const override { return _pd; }
Pd_session_capability cap(Cap_quota) const override { return _pd.rpc_cap(); }
};
#endif /* _INCLUDE__BASE__SERVICE_H_ */

View File

@ -143,7 +143,7 @@ class Genode::Session_state : public Parent::Client, public Parent::Server
~Session_state()
{
if (id_at_parent.is_constructed())
if (id_at_parent.constructed())
error("dangling session in parent-side ID space: ", *this);
}

View File

@ -38,8 +38,6 @@ namespace Genode {
class Signal;
class Signal_dispatcher_base;
template <typename> class Signal_dispatcher;
template <typename> class Io_signal_dispatcher;
template <typename, typename> class Signal_handler;
template <typename, typename> class Io_signal_handler;
@ -151,13 +149,11 @@ class Genode::Signal_transmitter
*/
void context(Signal_context_capability context);
/**
* Return signal context
*/
Signal_context_capability context();
/**
* Trigger signal submission to context
*
@ -258,18 +254,6 @@ class Genode::Signal_context : Interface, Noncopyable
List_element<Signal_context> *deferred_le() { return &_deferred_le; }
/**
* Local signal submission (DEPRECATED)
*
* \noapi
*
* Trigger local signal submission (within the same address space), the
* context has to be bound to a sginal receiver beforehand.
*
* \param num number of pending signals
*/
void submit(unsigned num);
/*
* Signal contexts are never invoked but only used as arguments for
* 'Signal_session' methods. Hence, there exists a capability
@ -453,67 +437,6 @@ struct Genode::Signal_dispatcher_base : Signal_context
};
/**
* Adapter for directing signals to object methods
*
* This utility associates object methods with signals. It is intended to
* be used as a member variable of the class that handles incoming signals
* of a certain type. The constructor takes a pointer-to-member to the
* signal handling method as argument. If a signal is received at the
* common signal reception code, this method will be invoked by calling
* 'Signal_dispatcher_base::dispatch'.
*
* \param T type of signal-handling class
*/
template <typename T>
class Genode::Signal_dispatcher : public Signal_dispatcher_base
{
private:
Signal_context_capability _cap;
T &obj;
void (T::*member) (unsigned);
Signal_receiver &sig_rec;
public:
/**
* Constructor
*
* \param sig_rec signal receiver to associate the signal
* handler with
* \param obj,member object and method to call when
* the signal occurs
*/
Signal_dispatcher(Signal_receiver &sig_rec,
T &obj, void (T::*member)(unsigned))
:
_cap(sig_rec.manage(this)),
obj(obj), member(member),
sig_rec(sig_rec)
{ }
~Signal_dispatcher() { sig_rec.dissolve(this); }
void dispatch(unsigned num) override { (obj.*member)(num); }
operator Capability<Signal_context>() const { return _cap; }
};
/**
* Signal dispatcher for I/O-level signals
*/
template <typename T>
struct Genode::Io_signal_dispatcher : Signal_dispatcher<T>
{
Io_signal_dispatcher(Signal_receiver &sig_rec,
T &obj, void (T::*member)(unsigned))
: Signal_dispatcher<T>(sig_rec, obj, member)
{ Signal_context::_level = Signal_context::Level::Io; }
};
/**
* Signal dispatcher for handling signals by an object method
*

View File

@ -19,17 +19,7 @@
namespace Genode { class Slab; }
/**
* Transitional type definition, for API compatibility only
*
* \deprecated To be removed once all Slab users are updated.
*/
namespace Genode { typedef void Slab_block; }
/**
* Slab allocator
*/
class Genode::Slab : public Allocator
{
private:
@ -52,7 +42,7 @@ class Genode::Slab : public Allocator
*/
Block *_curr_sb = nullptr;
Allocator *_backing_store;
Allocator *_backing_store;
/**
* Allocate and initialize new slab block

View File

@ -20,7 +20,6 @@
#include <base/trace/logger.h>
#include <cpu/consts.h>
#include <util/string.h>
#include <ram_session/ram_session.h> /* for 'Ram_dataspace_capability' type */
#include <cpu_session/cpu_session.h> /* for 'Thread_capability' type */
namespace Genode {

View File

@ -2,9 +2,6 @@
* \brief Thread state
* \author Norman Feske
* \date 2007-07-30
*
* This file provides a generic implementation of the 'Thread state' class.
* Base platforms can provide their own version of this file.
*/
/*
@ -17,14 +14,17 @@
#ifndef _INCLUDE__BASE__THREAD_STATE_H_
#define _INCLUDE__BASE__THREAD_STATE_H_
#include <base/thread_state_base.h>
#include <cpu/cpu_state.h>
namespace Genode { struct Thread_state; }
struct Genode::Thread_state : Thread_state_base
struct Genode::Thread_state : Cpu_state
{
Thread_state() {}
Thread_state(Thread_state_base &base) : Thread_state_base(base) {}
bool unresolved_page_fault = false;
bool exception = false;
Thread_state() { };
Thread_state(Cpu_state &c) : Cpu_state(c) { };
};
#endif /* _INCLUDE__BASE__THREAD_STATE_H_ */

View File

@ -1,32 +0,0 @@
/*
* \brief Thread state base class
* \author Norman Feske
* \date 2007-07-30
*
* This file contains the generic part of the thread state.
*/
/*
* Copyright (C) 2007-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__BASE__THREAD_STATE_BASE_H_
#define _INCLUDE__BASE__THREAD_STATE_BASE_H_
#include <cpu/cpu_state.h>
namespace Genode { struct Thread_state_base; }
struct Genode::Thread_state_base : Cpu_state
{
bool unresolved_page_fault = false;
bool exception = false;
Thread_state_base() { };
Thread_state_base(Cpu_state &c) : Cpu_state(c) { };
};
#endif /* _INCLUDE__BASE__THREAD_STATE_BASE_H_ */

View File

@ -155,11 +155,6 @@ class Genode::Trace::Buffer
* +--------------------------+------------+-------------+---+---------------------+
*/
bool last() const { return _entry == 0; }
/*
* \deprecated use 'last' instead
*/
bool is_last() const { return last(); }
};
Entry first() const

View File

@ -351,14 +351,6 @@ struct Genode::Locked_ptr : Genode::Locked_ptr_base
* the attempt will result in a null-pointer access.
*/
bool valid() const { return curr != nullptr; }
/**
* Returns true if the locked pointer is valid
*
* \noapi
* \deprecated use 'valid' instead
*/
bool is_valid() const { return valid(); }
};

View File

@ -1,29 +0,0 @@
/*
* \brief CAP-session interface
* \author Norman Feske
* \date 2006-06-23
*
* \deprecated
*
* This header is scheduled for removal. It exists for API compatiblity only.
*/
#ifndef INCLUDED_BY_ENTRYPOINT_CC
#warning cap_session/cap_session.h is deprecated
#endif
/*
* Copyright (C) 2006-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__CAP_SESSION__CAP_SESSION_H_
#define _INCLUDE__CAP_SESSION__CAP_SESSION_H_
#include <pd_session/pd_session.h>
namespace Genode { typedef Pd_session Cap_session; }
#endif /* _INCLUDE__CAP_SESSION__CAP_SESSION_H_ */

View File

@ -1,47 +0,0 @@
/*
* \brief Connection to CAP service
* \author Norman Feske
* \date 2008-08-22
*
* \deprecated
*
* This header is scheduled for removal. It exists for API compatiblity only.
*/
/*
* Copyright (C) 2008-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__CAP_SESSION__CONNECTION_H_
#define _INCLUDE__CAP_SESSION__CONNECTION_H_
#include <cap_session/cap_session.h>
#include <pd_session/client.h>
#include <base/env.h>
namespace Genode { struct Cap_connection; }
#ifndef INCLUDED_BY_ENTRYPOINT_CC
#warning cap_session.h is deprecated
#endif
/*
* There are no CAP connections anymore. The only situation where CAP
* connections were created was inside old-fashioned servers that used
* to create an 'Rpc_entrypoint' manually. The 'Rpc_entrypoint' requires
* a CAP session as constructor argument. We accommodate this use case
* by allocating RPC capabilities from the server's protection domain.
*
* Modern components no longer create 'Rpc_entrypoint' objects directly
* but instead use the new 'Entrypoint' interface.
*/
struct Genode::Cap_connection : Pd_session_client
{
Cap_connection() : Pd_session_client(env_deprecated()->pd_session_cap()) { }
} __attribute__((deprecated));
#endif /* _INCLUDE__CAP_SESSION__CONNECTION_H_ */

View File

@ -24,19 +24,6 @@ struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
{
enum { RAM_QUOTA = 36*1024 };
/**
* Issue session request
*
* \noapi
*/
Capability<Cpu_session> _session(Parent &parent, char const *label,
long priority, Affinity const &affinity)
{
return session(parent, affinity,
"priority=0x%lx, ram_quota=128K, cap_quota=%u, label=\"%s\"",
priority, CAP_QUOTA, label);
}
/**
* Constructor
*
@ -47,21 +34,11 @@ struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
Cpu_connection(Env &env, const char *label = "", long priority = DEFAULT_PRIORITY,
Affinity const &affinity = Affinity())
:
Connection<Cpu_session>(env, _session(env.parent(), label, priority, affinity)),
Cpu_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Cpu_connection(const char *label = "", long priority = DEFAULT_PRIORITY,
Affinity const &affinity = Affinity()) __attribute__((deprecated))
:
Connection<Cpu_session>(_session(*env_deprecated()->parent(), label, priority, affinity)),
Connection<Cpu_session>(env,
session(env.parent(), affinity,
"priority=0x%lx, ram_quota=%u, "
"cap_quota=%u, label=\"%s\"",
priority, RAM_QUOTA, CAP_QUOTA, label)),
Cpu_session_client(cap())
{ }
};

View File

@ -18,7 +18,6 @@
#include <cpu_thread/cpu_thread.h>
#include <base/stdint.h>
#include <base/rpc_args.h>
#include <thread/capability.h>
#include <session/session.h>
#include <dataspace/capability.h>
#include <pd_session/pd_session.h>
@ -27,6 +26,8 @@ namespace Genode {
struct Cpu_session;
struct Cpu_session_client;
typedef Capability<Cpu_thread> Thread_capability;
}

View File

@ -1,22 +0,0 @@
/*
* \brief Thread capability type
* \author Norman Feske
* \date 2016-05-11
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__CPU_THREAD__CAPABILITY_H_
#define _INCLUDE__CPU_THREAD__CAPABILITY_H_
#include <cpu_thread/cpu_thread.h>
#include <base/capability.h>
namespace Genode { typedef Capability<Cpu_thread> Cpu_thread_capability; }
#endif /* _INCLUDE__CPU_THREAD__CAPABILITY_H_ */

View File

@ -20,8 +20,6 @@
#include <parent/capability.h>
#include <parent/parent.h>
#include <region_map/region_map.h>
#include <rm_session/rm_session.h> /* deprecated, kept for API compatibility only */
#include <ram_session/capability.h>
#include <cpu_session/cpu_session.h>
#include <cpu_session/capability.h>
#include <pd_session/capability.h>
@ -68,16 +66,6 @@ struct Genode::Env_deprecated : Interface
*/
virtual Parent *parent() = 0;
/**
* RAM session of the component
*
* The RAM Session represents a budget of memory (quota) that is
* available to the component. This budget can be used to allocate
* RAM dataspaces.
*/
virtual Ram_session *ram_session() { return pd_session(); }
virtual Ram_session_capability ram_session_cap() { return pd_session_cap(); }
/**
* CPU session of the component
*
@ -101,11 +89,6 @@ struct Genode::Env_deprecated : Interface
virtual Pd_session *pd_session() = 0;
virtual Pd_session_capability pd_session_cap() = 0;
/**
* Heap backed by the RAM session of the environment
*/
virtual Allocator *heap() = 0;
/**
* Reload parent capability and reinitialize environment resources
*

View File

@ -22,18 +22,6 @@ namespace Genode { struct Io_mem_connection; }
struct Genode::Io_mem_connection : Connection<Io_mem_session>, Io_mem_session_client
{
/**
* Issue session request
*
* \noapi
*/
Capability<Io_mem_session> _session(Parent &, addr_t base, size_t size,
bool write_combined)
{
return session("cap_quota=%u, ram_quota=6K, base=0x%p, size=0x%lx, wc=%s",
CAP_QUOTA, base, size, write_combined ? "yes" : "no");
}
/**
* Constructor
*
@ -43,36 +31,12 @@ struct Genode::Io_mem_connection : Connection<Io_mem_session>, Io_mem_session_cl
*/
Io_mem_connection(Env &env, addr_t base, size_t size, bool write_combined = false)
:
Connection<Io_mem_session>(env, _session(env.parent(), base, size, write_combined)),
Io_mem_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Io_mem_connection(addr_t base, size_t size, bool write_combined = false) __attribute__((deprecated))
:
Connection<Io_mem_session>(_session(*env_deprecated()->parent(), base, size, write_combined)),
Io_mem_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*
* This variant is solely meant to be called from deprecated functions.
* It will be removed along with these functions.
*/
Io_mem_connection(bool, addr_t base, size_t size, bool write_combined = false)
:
Connection<Io_mem_session>(_session(*env_deprecated()->parent(), base, size, write_combined)),
Connection<Io_mem_session>(env,
session(env.parent(),
"cap_quota=%u, ram_quota=6K, "
"base=0x%p, size=0x%lx, wc=%s",
CAP_QUOTA, base, size,
write_combined ? "yes" : "no")),
Io_mem_session_client(cap())
{ }
};

View File

@ -42,20 +42,11 @@ struct Genode::Io_port_connection : Connection<Io_port_session>,
*/
Io_port_connection(Env &env, unsigned base, unsigned size)
:
Connection<Io_port_session>(env, _session(env.parent(), base, size)),
Io_port_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Io_port_connection(unsigned base, unsigned size) __attribute__((deprecated))
:
Connection<Io_port_session>(_session(*env_deprecated()->parent(), base, size)),
Connection<Io_port_session>(env,
session(env.parent(),
"ram_quota=6K, cap_quota=%u, "
"io_port_base=%u, io_port_size=%u",
CAP_QUOTA, base, size)),
Io_port_session_client(cap())
{ }
};

View File

@ -21,22 +21,6 @@ namespace Genode { struct Irq_connection; }
struct Genode::Irq_connection : Connection<Irq_session>, Irq_session_client
{
/**
* Issue session request
*
* \noapi
*/
Capability<Irq_session> _session(Parent &,
unsigned irq,
Irq_session::Trigger trigger,
Irq_session::Polarity polarity,
Genode::addr_t device_config_phys)
{
return session("ram_quota=6K, cap_quota=4, irq_number=%u, irq_trigger=%u, "
" irq_polarity=%u, device_config_phys=0x%lx",
irq, trigger, polarity, device_config_phys);
}
/**
* Constructor
*
@ -50,25 +34,11 @@ struct Genode::Irq_connection : Connection<Irq_session>, Irq_session_client
Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED,
Genode::addr_t device_config_phys = 0)
:
Connection<Irq_session>(env, _session(env.parent(), irq, trigger,
polarity, device_config_phys)),
Irq_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Irq_connection(unsigned irq,
Irq_session::Trigger trigger = Irq_session::TRIGGER_UNCHANGED,
Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED,
Genode::addr_t device_config_phys = 0) __attribute__((deprecated))
:
Connection<Irq_session>(_session(*Genode::env_deprecated()->parent(), irq,
trigger, polarity, device_config_phys)),
Connection<Irq_session>(env, session(env.parent(),
"ram_quota=6K, cap_quota=4, "
"irq_number=%u, irq_trigger=%u, "
"irq_polarity=%u, device_config_phys=0x%lx",
irq, trigger, polarity, device_config_phys)),
Irq_session_client(cap())
{ }
};

View File

@ -35,20 +35,6 @@ struct Genode::Log_connection : Connection<Log_session>, Log_session_client
RAM_QUOTA, CAP_QUOTA, label.string())),
Log_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Log_connection(Session_label label = Session_label()) __attribute__((deprecated))
:
Connection<Log_session>(session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label.string())),
Log_session_client(cap())
{ }
};
#endif /* _INCLUDE__LOG_SESSION__CONNECTION_H_ */

View File

@ -86,8 +86,8 @@ struct Genode::Pd_session_client : Rpc_client<Pd_session>
return ds.valid() ? Dataspace_client(ds).size() : 0;
}
void transfer_quota(Pd_session_capability ram_session, Ram_quota amount) override {
call<Rpc_transfer_ram_quota>(ram_session, amount); }
void transfer_quota(Pd_session_capability pd_session, Ram_quota amount) override {
call<Rpc_transfer_ram_quota>(pd_session, amount); }
Ram_quota ram_quota() const override { return call<Rpc_ram_quota>(); }
Ram_quota used_ram() const override { return call<Rpc_used_ram>(); }

View File

@ -37,19 +37,6 @@ struct Genode::Pd_connection : Connection<Pd_session>, Pd_session_client
RAM_QUOTA, CAP_QUOTA, label, space)),
Pd_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Pd_connection(char const *label = "") __attribute__((deprecated))
:
Connection<Pd_session>(session("ram_quota=%u, label=\"%s\"", RAM_QUOTA, label)),
Pd_session_client(cap())
{ }
};
#endif /* _INCLUDE__PD_SESSION__CONNECTION_H_ */

View File

@ -16,7 +16,6 @@
#define _INCLUDE__PD_SESSION__PD_SESSION_H_
#include <base/exception.h>
#include <thread/capability.h>
#include <session/session.h>
#include <region_map/region_map.h>
#include <base/ram_allocator.h>

View File

@ -1,29 +0,0 @@
/*
* \brief RAM-session capability type
* \author Norman Feske
* \date 2008-08-16
*/
/*
* Copyright (C) 2008-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__RAM_SESSION__CAPABILITY_H_
#define _INCLUDE__RAM_SESSION__CAPABILITY_H_
#include <base/capability.h>
namespace Genode {
/*
* We cannot include 'ram_session/ram_session.h' because this file relies
* on the the 'Ram_session_capability' type.
*/
class Pd_session;
typedef Capability<Pd_session> Ram_session_capability;
}
#endif /* _INCLUDE__RAM_SESSION__CAPABILITY_H_ */

View File

@ -1,23 +0,0 @@
/*
* \brief RAM session interface
* \author Norman Feske
* \date 2006-05-11
*
* \deprecated The RAM session interface is integrated in the PD session now.
*/
/*
* Copyright (C) 2006-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__RAM_SESSION__RAM_SESSION_H_
#define _INCLUDE__RAM_SESSION__RAM_SESSION_H_
#include <pd_session/pd_session.h>
namespace Genode { typedef Pd_session Ram_session; }
#endif /* _INCLUDE__RAM_SESSION__RAM_SESSION_H_ */

View File

@ -19,7 +19,6 @@
#include <base/signal.h>
#include <base/quota_guard.h>
#include <dataspace/capability.h>
#include <thread/capability.h>
namespace Genode { struct Region_map; }

View File

@ -35,19 +35,6 @@ struct Genode::Rm_connection : Connection<Rm_session>, Rm_session_client
Rm_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Rm_connection() __attribute__((deprecated))
:
Connection<Rm_session>(session("ram_quota=%u, cap_quota=%u", RAM_QUOTA, CAP_QUOTA)),
Rm_session_client(cap())
{ }
/**
* Wrapper over 'create' that handles resource requests
* from the server.

View File

@ -21,82 +21,32 @@
namespace Genode { class Rom_connection; }
class Genode::Rom_connection : public Connection<Rom_session>,
public Rom_session_client
struct Genode::Rom_connection : Connection<Rom_session>,
Rom_session_client
{
public:
class Rom_connection_failed : public Service_denied { };
class Rom_connection_failed : public Service_denied { };
enum { RAM_QUOTA = 6*1024UL };
enum { RAM_QUOTA = 6*1024UL };
private:
Rom_session_capability _session(Parent &, char const *label)
{
return session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label);
}
public:
/**
* Constructor
*
* \param label request label and name of ROM module
*
* \throw Rom_connection_failed
*/
Rom_connection(Env &env, const char *label)
try :
Connection<Rom_session>(env, _session(env.parent(), label)),
Rom_session_client(cap())
{ }
catch (...) {
error("Could not open ROM session for \"", label, "\"");
throw Rom_connection_failed();
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Rom_connection(const char *label) __attribute__((deprecated))
try :
Connection<Rom_session>(_session(*env_deprecated()->parent(), label)),
Rom_session_client(cap())
{ }
catch (...) {
error("Could not open ROM session for \"", label, "\"");
throw Rom_connection_failed();
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*
* This version is deliberately used by functions that are marked as
* deprecated. If such a function called directly the
* __attribute__((deprecate)) version, we would always get a warning,
* even if the outer deprecated function is not called.
*
* It will be removed as soon as they are gone.
*/
Rom_connection(bool, const char *label)
try :
Connection<Rom_session>(_session(*env_deprecated()->parent(), label)),
Rom_session_client(cap())
{ }
catch (...) {
error("Could not open ROM session for \"", label, "\"");
throw Rom_connection_failed();
}
/**
* Constructor
*
* \param label request label and name of ROM module
*
* \throw Rom_connection_failed
*/
Rom_connection(Env &env, const char *label)
try :
Connection<Rom_session>(env,
session(env.parent(),
"ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label)),
Rom_session_client(cap())
{ }
catch (...) {
error("Could not open ROM session for \"", label, "\"");
throw Rom_connection_failed();
}
};
#endif /* _INCLUDE__ROM_SESSION__CONNECTION_H_ */

View File

@ -1,23 +0,0 @@
/*
* \brief Thread capability type
* \author Norman Feske
* \date 2008-08-16
*
* \deprecated Use cpu_thread/capability.h instead
*/
/*
* Copyright (C) 2008-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__THREAD__CAPABILITY_H_
#define _INCLUDE__THREAD__CAPABILITY_H_
#include <cpu_thread/capability.h>
namespace Genode { typedef Cpu_thread_capability Thread_capability; }
#endif /* _INCLUDE__THREAD__CAPABILITY_H_ */

View File

@ -261,15 +261,6 @@ class Timer::Connection : public Genode::Connection<Session>,
*/
Connection(Genode::Env &env, char const *label = "");
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated));
~Connection() { _sig_rec.dissolve(&_default_sigh_ctx); }
/*

View File

@ -23,21 +23,6 @@ namespace Genode { namespace Trace { struct Connection; } }
struct Genode::Trace::Connection : Genode::Connection<Genode::Trace::Session>,
Genode::Trace::Session_client
{
/**
* Issue session request
*
* \noapi
*/
Capability<Trace::Session> _session(Parent &parent,
size_t ram_quota,
size_t arg_buffer_size,
unsigned parent_levels)
{
return session(parent,
"ram_quota=%lu, arg_buffer_size=%lu, parent_levels=%u",
ram_quota + 2048, arg_buffer_size, parent_levels);
}
/**
* Constructor
*
@ -47,25 +32,11 @@ struct Genode::Trace::Connection : Genode::Connection<Genode::Trace::Session>,
*/
Connection(Env &env, size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels)
:
Genode::Connection<Session>(env, _session(env.parent(), ram_quota,
arg_buffer_size, parent_levels)),
Genode::Connection<Session>(env,
session(env.parent(), "ram_quota=%lu, arg_buffer_size=%lu, parent_levels=%u",
ram_quota + 2048, arg_buffer_size, parent_levels)),
Session_client(env.rm(), cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*env_deprecated()->parent(),
ram_quota, arg_buffer_size,
parent_levels)),
Session_client(*env_deprecated()->rm_session(), cap())
{ }
};
#endif /* _INCLUDE__TRACE_SESSION__CONNECTION_H_ */

View File

@ -129,13 +129,6 @@ class Genode::Reconstructible : Noncopyable
*/
bool constructed() const { return _constructed; }
/**
* Return true of volatile object contains a constructed object
*
* \deprecated use 'constructed' instead
*/
bool is_constructed() const { return constructed(); }
/**
* Construct or destruct volatile object according to 'condition'
*/

View File

@ -721,81 +721,6 @@ class Genode::Register_set : Noncopyable
wait_for<CONDITIONS...>(Attempts(500), Microseconds(1000),
delayer, conditions...);
}
/**
* Wait until register 'T' contains the specified 'value'
*
* \param value value to wait for
* \param delayer sleeping facility to be used when the
* value is not reached yet
* \param max_attempts number of register probing attempts
* \param us number of microseconds between attempts
*
* \noapi
* \deprecated use 'template <typename... CONDITIONS> wait_for'
*/
template <typename T>
inline bool
wait_for(typename T::Register_base::access_t const value,
Delayer & delayer,
unsigned max_attempts = 500,
unsigned us = 1000) __attribute__ ((deprecated));
/**
* Wait until bitfield 'T' contains the specified 'value'
*
* \param value value to wait for
* \param delayer sleeping facility to be used when the
* value is not reached yet
* \param max_attempts number of bitfield probing attempts
* \param us number of microseconds between attempts
*
* \noapi
* \deprecated use 'template <typename... CONDITIONS> wait_for'
*/
template <typename T>
inline bool
wait_for(typename T::Bitfield_base::Compound_reg::access_t const value,
Delayer & delayer,
unsigned max_attempts = 500,
unsigned us = 1000) __attribute__ ((deprecated));
};
template <typename PLAIN_ACCESS>
template <typename T>
bool Genode::Register_set<PLAIN_ACCESS>::
wait_for(typename T::Register_base::access_t const value,
Delayer &delayer,
unsigned max_attempts,
unsigned us)
{
typedef typename T::Register_base Register;
for (unsigned i = 0; i < max_attempts; i++, delayer.usleep(us))
{
if (read<Register>() == value) {
return true; }
}
return false;
}
template <typename PLAIN_ACCESS>
template <typename T>
bool Genode::Register_set<PLAIN_ACCESS>::
wait_for(typename T::Bitfield_base::Compound_reg::access_t const value,
Delayer &delayer,
unsigned max_attempts,
unsigned us)
{
typedef typename T::Bitfield_base Bitfield;
for (unsigned i = 0; i < max_attempts; i++, delayer.usleep(us))
{
if (read<Bitfield>() == value) {
return true; }
}
return false;
}
#endif /* _INCLUDE__UTIL__REGISTER_SET_H_ */

View File

@ -1,38 +0,0 @@
/*
* \brief Utility for manual in-place construction of objects
* \author Norman Feske
* \date 2014-01-10
*
* \deprecated use 'util/reconstructible.h' instead
*/
/*
* Copyright (C) 2014-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__UTIL__VOLATILE_OBJECT_H_
#define _INCLUDE__UTIL__VOLATILE_OBJECT_H_
#include <util/reconstructible.h>
#warning "'util/volatile_object.h' is deprecated, use 'util/reconstructible.h' instead (see https://github.com/genodelabs/genode/issues/2151)"
namespace Genode {
template <typename T>
struct Volatile_object : Reconstructible<T>
{
using Reconstructible<T>::Reconstructible;
};
template <typename T>
struct Lazy_volatile_object : Constructible<T>
{
using Constructible<T>::Constructible;
};
}
#endif /* _INCLUDE__UTIL__VOLATILE_OBJECT_H_ */

View File

@ -52,21 +52,6 @@ struct Genode::Vm_connection : Connection<Vm_session>, Vm_session_client
Vm_session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Vm_connection(const char *label = "",
long priority = Cpu_session::DEFAULT_PRIORITY,
unsigned long affinity = 0) __attribute__((deprecated))
:
Connection<Vm_session>(_session(*env_deprecated()->parent(), label, priority, affinity)),
Vm_session_client(cap())
{ }
template <typename FUNC>
auto with_upgrade(FUNC func) -> decltype(func())
{

View File

@ -17,8 +17,9 @@
/* Genode includes */
#include <base/rpc_args.h>
#include <base/signal.h>
#include <base/ram_allocator.h>
#include <cpu_session/cpu_session.h>
#include <session/session.h>
#include <ram_session/ram_session.h>
namespace Genode { struct Vm_session; }

View File

@ -94,7 +94,6 @@ class Genode::Core_env : public Env_deprecated, Noncopyable
Parent *parent() override { return nullptr; }
Region_map *rm_session() override { return &_region_map; }
Pd_session *pd_session() override { return &_pd_session; }
Allocator *heap() override { ASSERT_NEVER_CALLED; }
Cpu_session *cpu_session() override { ASSERT_NEVER_CALLED; }
Cpu_session_capability cpu_session_cap() override { ASSERT_NEVER_CALLED; }
Pd_session_capability pd_session_cap() override { return _pd_session.cap(); }

View File

@ -113,7 +113,6 @@ class Genode::Platform_env : public Platform_env_base
Pd_session *pd_session() override { return &_resources.pd; }
Pd_session_capability pd_session_cap() override { return _resources.pd.rpc_cap(); }
Region_map *rm_session() override { return &_resources.rm; }
Allocator *heap() override { return &_heap; }
};
#endif /* _INCLUDE__BASE__INTERNAL__PLATFORM_ENV_H_ */

View File

@ -135,34 +135,6 @@ create_session(Child_policy::Name const &child_name, Service &service,
}
/*
* \deprecated Temporary wrapper around 'Child_policy::resolve_session_request'
* that tries both overloads.
*
* \throw Service_denied
*/
Child_policy::Route Child::_resolve_session_request(Child_policy &policy,
Service::Name const &name,
char const *argbuf)
{
Session_label const label = label_from_args(argbuf);
/*
* \deprecated Try old interface, remove once all 'Child_policy'
* implementations are updated.
*/
try {
Session_state::Args args(argbuf);
return { policy.resolve_session_request(name, args), label,
session_diag_from_args(argbuf) };
}
catch (Service_denied) { }
return policy.resolve_session_request(name, label);
}
Session_capability Child::session(Parent::Client::Id id,
Parent::Service_name const &name,
Parent::Session_args const &args,
@ -176,9 +148,9 @@ Session_capability Child::session(Parent::Client::Id id,
strncpy(argbuf, args.string(), sizeof(argbuf));
/* prefix session label */
Session_label const orig_label(label_from_args(argbuf));
Arg_string::set_arg_string(argbuf, sizeof(argbuf), "label",
prefixed_label(_policy.name(), orig_label).string());
Session_label const label = prefixed_label(_policy.name(), label_from_args(argbuf));
Arg_string::set_arg_string(argbuf, sizeof(argbuf), "label", label.string());
/* filter session arguments according to the child policy */
_policy.filter_session_args(name.string(), argbuf, sizeof(argbuf));
@ -202,7 +174,8 @@ Session_capability Child::session(Parent::Client::Id id,
Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", forward_ram_quota.value);
/* may throw a 'Service_denied' exception */
Child_policy::Route route = _resolve_session_request(_policy, name.string(), argbuf);
Child_policy::Route route = _policy.resolve_session_request(name.string(), label);
Service &service = route.service;
/* propagate diag flag */

View File

@ -26,7 +26,7 @@ using namespace Genode;
Child::Process::Loaded_executable::Loaded_executable(Type type,
Dataspace_capability ldso_ds,
Ram_session &ram,
Ram_allocator &ram,
Region_map &local_rm,
Region_map &remote_rm,
Parent_capability parent_cap)

View File

@ -48,11 +48,3 @@ Connection_base::Connection_base()
_env(internal_env()),
_id_space_element(_parent_client, _env.id_space())
{ }
/*
* \deprecated
*/
Env &Parent_service::_env_deprecated() { return internal_env(); }

View File

@ -140,17 +140,6 @@ Timer::Connection::Connection(Genode::Env &env, char const *label)
}
Timer::Connection::Connection()
:
Genode::Connection<Session>(session("ram_quota=10K")),
Session_client(cap()),
_signal_handler(internal_env().ep(), *this, &Connection::_handle_timeout)
{
/* register default signal handler */
Session_client::sigh(_default_sigh_cap);
}
void Timer::Connection::_schedule_one_shot(Timeout &timeout, Microseconds duration)
{
_enable_modern_mode();

View File

@ -23,17 +23,6 @@ namespace Audio_out { struct Connection; }
struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Audio_out::Session> _session(Genode::Parent &parent, char const *channel)
{
return session(parent, "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"",
2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel);
}
/**
* Constructor
*
@ -49,24 +38,12 @@ struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_c
bool alloc_signal = true,
bool progress_signal = false)
:
Genode::Connection<Session>(env, _session(env.parent(), channel)),
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=%ld, cap_quota=%ld, channel=\"%s\"",
2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel)),
Session_client(env.rm(), cap(), alloc_signal, progress_signal)
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(const char *channel,
bool alloc_signal = true,
bool progress_signal = false) __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), channel)),
Session_client(*Genode::env_deprecated()->rm_session(), cap(), alloc_signal, progress_signal)
{ }
};
#endif /* _INCLUDE__AUDIO_OUT_SESSION__CONNECTION_H_ */

View File

@ -22,19 +22,6 @@ namespace Block { struct Connection; }
struct Block::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Block::Session> _session(Genode::Parent &parent,
char const *label,
Genode::size_t tx_buf_size)
{
return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label);
}
/**
* Constructor
*
@ -47,24 +34,12 @@ struct Block::Connection : Genode::Connection<Session>, Session_client
Genode::size_t tx_buf_size = 128*1024,
const char *label = "")
:
Genode::Connection<Session>(env, _session(env.parent(), label, tx_buf_size)),
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)),
Session_client(cap(), *tx_block_alloc, env.rm())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(Genode::Range_allocator *tx_block_alloc,
Genode::size_t tx_buf_size = 128*1024,
const char *label = "") __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size)),
Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session())
{ }
};
#endif /* _INCLUDE__BLOCK_SESSION__CONNECTION_H_ */

View File

@ -41,16 +41,6 @@ class Block::Session_rpc_object : public Genode::Rpc_object<Session, Session_rpc
Genode::Rpc_entrypoint &ep)
: _tx(tx_ds, local_rm, ep) { }
/**
* Constructor
*
* \deprecated
* \noapi
*/
Session_rpc_object(Genode::Dataspace_capability tx_ds,
Genode::Rpc_entrypoint &ep) __attribute__((deprecated))
: _tx(tx_ds, *Genode::env_deprecated()->rm_session(), ep) { }
/**
* Return capability to packet-stream channel
*

View File

@ -19,69 +19,20 @@
namespace Decorator {
template <typename T>
static T attribute(Xml_node const &, char const *, T);
template <size_t CAPACITY>
Genode::String<CAPACITY> string_attribute(Xml_node const &, char const *,
Genode::String<CAPACITY> const &);
static Point point_attribute(Xml_node const &);
static Area area_attribute(Xml_node const &);
static Rect rect_attribute(Xml_node const &);
template <typename FUNC>
static void for_each_sub_node(Xml_node, char const *, FUNC const &);
static Area area_attribute(Xml_node const &);
static Rect rect_attribute(Xml_node const &);
static Color color(Xml_node const &);
}
/**
* Read attribute value from XML node
*
* \param node XML node
* \param name attribute name
* \param default_value value returned if no such attribute exists
*/
template <typename T>
static T
Decorator::attribute(Xml_node const &node, char const *name, T default_value)
{
T result = default_value;
if (node.has_attribute(name))
node.attribute(name).value(&result);
return result;
}
/**
* Read string from XML node
*/
template <Genode::size_t CAPACITY>
Genode::String<CAPACITY>
Decorator::string_attribute(Xml_node const &node, char const *attr,
Genode::String<CAPACITY> const &default_value)
{
if (!node.has_attribute(attr))
return default_value;
char buf[CAPACITY];
node.attribute(attr).value(buf, sizeof(buf));
return Genode::String<CAPACITY>(Genode::Cstring(buf));
}
/**
* Read point position from XML node
*/
static inline Decorator::Point Decorator::point_attribute(Genode::Xml_node const &point)
{
return Point(attribute(point, "xpos", 0L),
attribute(point, "ypos", 0L)); }
return Point(point.attribute_value("xpos", 0L),
point.attribute_value("ypos", 0L)); }
/**
@ -89,8 +40,8 @@ static inline Decorator::Point Decorator::point_attribute(Genode::Xml_node const
*/
static inline Decorator::Area Decorator::area_attribute(Genode::Xml_node const &area)
{
return Area(attribute(area, "width", 0UL),
attribute(area, "height", 0UL));
return Area(area.attribute_value("width", 0UL),
area.attribute_value("height", 0UL));
}
@ -103,33 +54,12 @@ static inline Decorator::Rect Decorator::rect_attribute(Genode::Xml_node const &
}
/**
* Apply functor 'func' to all XML sub nodes of given type
*/
template <typename FUNC>
static void
Decorator::for_each_sub_node(Genode::Xml_node node, char const *type,
FUNC const &func)
{
if (!node.has_sub_node(type))
return;
for (node = node.sub_node(type); ; node = node.next()) {
if (node.has_type(type))
func(node);
if (node.last()) break;
}
}
/**
* Read color attribute from XML node
*/
static inline Genode::Color Decorator::color(Genode::Xml_node const &color)
{
return attribute(color, "color", Color(0, 0, 0));
return color.attribute_value("color", Color(0, 0, 0));
}
#endif /* _INCLUDE__DECORATOR__XML_UTILS_H_ */

View File

@ -58,17 +58,6 @@ namespace File_system {
}
/**
* Return true if specified path is a base name (contains no path delimiters)
*
* \deprecated use !contains_path_delimiter instead
*/
static inline bool is_basename(char const *path)
{
return !contains_path_delimiter(path);
}
/**
* Return true if 'str' is a valid node name
*/

View File

@ -26,89 +26,14 @@ namespace File_system {
/* recommended packet transmission buffer size */
enum { DEFAULT_TX_BUF_SIZE = 128*1024 };
}
/**
* The base implementation of a File_system connection
*/
struct File_system::Connection_base : Genode::Connection<Session>, Session_client
struct File_system::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<File_system::Session> _session(Genode::Parent &parent,
char const *label,
char const *root,
bool writeable,
size_t tx_buf_size)
{
return session(parent,
"ram_quota=%ld, "
"cap_quota=%ld, "
"tx_buf_size=%ld, "
"label=\"%s\", "
"root=\"%s\", "
"writeable=%d",
8*1024*sizeof(long) + tx_buf_size,
CAP_QUOTA,
tx_buf_size,
label, root, writeable);
}
/**
* Constructor
*
* \param tx_buffer_alloc allocator used for managing the
* transmission buffer
* \param label session label
* \param root root directory of session
* \param writeable session is writable
* \param tx_buf_size size of transmission buffer in bytes
*/
Connection_base(Genode::Env &env,
Genode::Range_allocator &tx_block_alloc,
char const *label = "",
char const *root = "/",
bool writeable = true,
size_t tx_buf_size = DEFAULT_TX_BUF_SIZE)
:
Genode::Connection<Session>(env, _session(env.parent(), label, root,
writeable, tx_buf_size)),
Session_client(cap(), tx_block_alloc, env.rm())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection_base(Genode::Range_allocator &tx_block_alloc,
size_t tx_buf_size = DEFAULT_TX_BUF_SIZE,
char const *label = "",
char const *root = "/",
bool writeable = true) __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label,
root, writeable, tx_buf_size)),
Session_client(cap(), tx_block_alloc, *Genode::env_deprecated()->rm_session())
{ }
};
/**
* A File_system connection that upgrades its RAM quota
*/
struct File_system::Connection : File_system::Connection_base
{
/* reuse constructor */
using Connection_base::Connection_base;
/**
* Extend session quota on demand while calling an RPC function
*
@ -122,13 +47,45 @@ struct File_system::Connection : File_system::Connection_base
[&] () {
return Genode::retry<Out_of_caps>(
[&] () { return func(); },
[&] () { File_system::Connection_base::upgrade_caps(2); },
[&] () { File_system::Connection::upgrade_caps(2); },
UPGRADE_ATTEMPTS);
},
[&] () { File_system::Connection_base::upgrade_ram(8*1024); },
[&] () { File_system::Connection::upgrade_ram(8*1024); },
UPGRADE_ATTEMPTS);
}
/**
* Constructor
*
* \param tx_buffer_alloc allocator used for managing the
* transmission buffer
* \param label session label
* \param root root directory of session
* \param writeable session is writable
* \param tx_buf_size size of transmission buffer in bytes
*/
Connection(Genode::Env &env,
Genode::Range_allocator &tx_block_alloc,
char const *label = "",
char const *root = "/",
bool writeable = true,
size_t tx_buf_size = DEFAULT_TX_BUF_SIZE)
:
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=%ld, "
"cap_quota=%ld, "
"tx_buf_size=%ld, "
"label=\"%s\", "
"root=\"%s\", "
"writeable=%d",
8*1024*sizeof(long) + tx_buf_size,
CAP_QUOTA,
tx_buf_size,
label, root, writeable)),
Session_client(cap(), tx_block_alloc, env.rm())
{ }
Dir_handle dir(Path const &path, bool create) override
{
return _retry([&] () {

View File

@ -229,20 +229,6 @@ struct File_system::Status
* Return true if node is a symbolic link
*/
bool symlink() const { return mode & MODE_SYMLINK; }
/**
* Return true if node is a directory
*
* \deprecated use 'directory' instead
*/
bool is_directory() const { return directory(); }
/**
* Return true if node is a symbolic link
*
* \deprecated use 'symlink' instead
*/
bool is_symlink() const { return symlink(); }
};

View File

@ -76,22 +76,6 @@ class Framebuffer::Connection : public Genode::Connection<Session>,
mode.format())),
Session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(unsigned width = 0,
unsigned height = 0,
Mode::Format format = Mode::INVALID) __attribute__((deprecated))
:
Genode::Connection<Session>(_connect(*Genode::env_deprecated()->parent(),
width, height, format)),
Session_client(cap())
{ }
};
#endif /* _INCLUDE__FRAMEBUFFER_SESSION__CONNECTION_H_ */

View File

@ -33,19 +33,6 @@ struct Gpio::Connection : Genode::Connection<Session>, Session_client
CAP_QUOTA, gpio_pin)),
Session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(unsigned long gpio_pin) __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=8K, gpio=%zd", gpio_pin)),
Session_client(cap())
{ }
};
#endif /* _INCLUDE__GPIO_SESSION__CONNECTION_H_ */

View File

@ -41,18 +41,6 @@ class Input::Session_client : public Genode::Rpc_client<Session>
_event_ds(local_rm, call<Rpc_dataspace>())
{ }
/**
* Constructor
*
* \deprecated
* \noapi
*/
explicit Session_client(Session_capability session) __attribute__((deprecated))
:
Genode::Rpc_client<Session>(session),
_event_ds(*Genode::env_deprecated()->rm_session(), call<Rpc_dataspace>())
{ }
Genode::Dataspace_capability dataspace() override {
return call<Rpc_dataspace>(); }

View File

@ -21,38 +21,17 @@ namespace Input { struct Connection; }
struct Input::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Input::Session> _session(Genode::Parent &parent, char const *label) {
return session(parent, "ram_quota=18K, cap_quota=%u, label=\"%s\"",
CAP_QUOTA, label); }
/**
* Constructor
*/
Connection(Genode::Env &env, char const *label = "")
:
Genode::Connection<Input::Session>(env, _session(env.parent(), label)),
Genode::Connection<Input::Session>(env,
session(env.parent(),
"ram_quota=18K, cap_quota=%u, label=\"%s\"",
CAP_QUOTA, label)),
Session_client(env.rm(), cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated))
:
Genode::Connection<Input::Session>(
session(*Genode::env_deprecated()->parent(),
"ram_quota=18K, cap_quota=3")),
Session_client(*Genode::env_deprecated()->rm_session(), cap())
{ }
};
#endif /* _INCLUDE__INPUT_SESSION__CONNECTION_H_ */

View File

@ -50,14 +50,6 @@ struct Input::Session : Genode::Session
*/
virtual bool pending() const = 0;
/**
* Request input state
*
* \noapi
* \deprecated use 'pending' instead
*/
bool is_pending() const { return pending(); }
/**
* Flush pending events to event buffer
*

View File

@ -34,19 +34,6 @@ struct Loader::Connection : Genode::Connection<Session>, Session_client
CAP_QUOTA + cap_quota.value)),
Session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(size_t ram_quota) __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=%ld", ram_quota)),
Session_client(cap())
{ }
};
#endif /* _INCLUDE__LOADER_SESSION__CONNECTION_H_ */

View File

@ -23,22 +23,6 @@ namespace Nic { struct Connection; }
struct Nic::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Nic::Session> _session(Genode::Parent &parent,
char const *label,
Genode::size_t tx_buf_size,
Genode::size_t rx_buf_size)
{
return session(parent,
"ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"",
32*1024*sizeof(long) + tx_buf_size + rx_buf_size,
CAP_QUOTA, tx_buf_size, rx_buf_size, label);
}
/**
* Constructor
*
@ -53,27 +37,14 @@ struct Nic::Connection : Genode::Connection<Session>, Session_client
Genode::size_t rx_buf_size,
char const *label = "")
:
Genode::Connection<Session>(env, _session(env.parent(), label,
tx_buf_size, rx_buf_size)),
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=%ld, cap_quota=%ld, "
"tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"",
32*1024*sizeof(long) + tx_buf_size + rx_buf_size,
CAP_QUOTA, tx_buf_size, rx_buf_size, label)),
Session_client(cap(), *tx_block_alloc, env.rm())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(Genode::Range_allocator *tx_block_alloc,
Genode::size_t tx_buf_size,
Genode::size_t rx_buf_size,
char const *label = "") __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label,
tx_buf_size, rx_buf_size)),
Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session())
{ }
};
#endif /* _INCLUDE__NIC_SESSION__CONNECTION_H_ */

View File

@ -48,21 +48,8 @@ class Nic::Session_rpc_object : public Genode::Rpc_object<Session, Session_rpc_o
Genode::Rpc_entrypoint &ep)
:
_tx(tx_ds, rm, ep),
_rx(rx_ds, rm, *rx_buffer_alloc, ep) { }
/**
* Constructor
*
* \deprecated
* \noapi
*/
Session_rpc_object(Genode::Dataspace_capability tx_ds,
Genode::Dataspace_capability rx_ds,
Genode::Range_allocator *rx_buffer_alloc,
Genode::Rpc_entrypoint &ep) __attribute__((deprecated))
:
_tx(tx_ds, *Genode::env_deprecated()->rm_session(), ep),
_rx(rx_ds, *Genode::env_deprecated()->rm_session(), *rx_buffer_alloc, ep) { }
_rx(rx_ds, rm, *rx_buffer_alloc, ep)
{ }
Genode::Capability<Tx> _tx_cap() { return _tx.cap(); }
Genode::Capability<Rx> _rx_cap() { return _rx.cap(); }

View File

@ -41,19 +41,6 @@ class Nitpicker::Session_client : public Genode::Rpc_client<Session>
_command_buffer(*_command_ds.local_addr<Command_buffer>())
{ }
/**
* Constructor
*
* \deprecated
* \noapi
*/
explicit Session_client(Session_capability session) __attribute__((deprecated))
:
Rpc_client<Session>(session),
_command_ds(*Genode::env_deprecated()->rm_session(), command_dataspace()),
_command_buffer(*_command_ds.local_addr<Command_buffer>())
{ }
Framebuffer::Session_capability framebuffer_session() override {
return call<Rpc_framebuffer_session>(); }

View File

@ -74,24 +74,6 @@ class Nitpicker::Connection : public Genode::Connection<Session>,
_input(env.rm(), input_session())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(char const *label = "") __attribute__((deprecated))
:
/* establish nitpicker session */
Genode::Connection<Session>(_connect(*Genode::env_deprecated()->parent(), label)),
Session_client(*Genode::env_deprecated()->rm_session(), cap()),
/* request frame-buffer and input sub sessions */
_framebuffer(framebuffer_session()),
_input(*Genode::env_deprecated()->rm_session(), input_session())
{ }
void buffer(Framebuffer::Mode mode, bool use_alpha) override
{
Genode::size_t const needed = ram_quota(mode, use_alpha);

View File

@ -162,14 +162,6 @@ struct Nitpicker::Session : Genode::Session
bool full() const { return _num >= MAX_COMMANDS; }
/**
* Return true if there is no space left in the command buffer
*
* \noapi
* \deprecated use 'full' instead
*/
bool is_full() const { return full(); }
unsigned num() const
{
/* copy out _num value to avoid use-after-check problems */

View File

@ -1,23 +0,0 @@
/*
* \brief Dataspace utility
* \author Norman Feske
* \date 2014-01-10
*
* \deprecated This header exists for API compatibility only.
*/
/*
* Copyright (C) 2014-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#warning os/attached_dataspace.h is deprecated, use base/attached_dataspace.h instead
#ifndef _INCLUDE__OS__ATTACHED_DATASPACE_H_
#define _INCLUDE__OS__ATTACHED_DATASPACE_H_
#include <base/attached_dataspace.h>
#endif /* _INCLUDE__OS__ATTACHED_DATASPACE_H_ */

View File

@ -1,23 +0,0 @@
/*
* \brief I/O MEM dataspace utility
* \author Norman Feske
* \date 2011-05-19
*
* \deprecated This header exists for API compatibility only.
*/
/*
* Copyright (C) 2011-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#warning os/attached_io_mem_dataspace.h is deprecated, use base/attached_io_mem_dataspace.h instead
#ifndef _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_
#define _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_
#include <base/attached_io_mem_dataspace.h>
#endif /* _INCLUDE__OS__ATTACHED_IO_MEM_DATASPACE_H_ */

View File

@ -1,23 +0,0 @@
/*
* \brief RAM dataspace utility
* \author Norman Feske
* \date 2008-03-22
*
* \deprecated This header exists for API compatibility only.
*/
/*
* Copyright (C) 2008-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#warning os/attached_ram_dataspace.h is deprecated, use base/attached_ram_dataspace.h instead
#ifndef _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_
#define _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_
#include <base/attached_ram_dataspace.h>
#endif /* _INCLUDE__OS__ATTACHED_RAM_DATASPACE_H_ */

View File

@ -1,23 +0,0 @@
/*
* \brief ROM dataspace utility
* \author Norman Feske
* \date 2012-01-09
*
* \deprecated This header exists for API compatibility only.
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#warning os/attached_rom_dataspace.h is deprecated, use base/attached_rom_dataspace.h instead
#ifndef _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_
#define _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_
#include <base/attached_rom_dataspace.h>
#endif /* _INCLUDE__OS__ATTACHED_ROM_DATASPACE_H_ */

View File

@ -38,14 +38,6 @@ class Genode::Path_base
return path[0] == '/';
}
/**
* Return true if path starts with a '/'
*
* \noapi
* \deprecated use 'absolute' instead
*/
static bool is_absolute(char const *path) { return absolute(path); }
static bool ends_with(char c, char const *path)
{
return path[0] && (path[strlen(path) - 1] == c);
@ -85,13 +77,6 @@ class Genode::Path_base
return strlen(path) == 0;
}
/**
* Return true if path contains no characters
*
* \deprecated use 'empty' instead
*/
static bool is_empty(char const *path) { return empty(path); }
/**
* Remove superfluous single dots followed by a slash from path
*/

View File

@ -1,103 +0,0 @@
/*
* \brief RAM session guard
* \author Stefan Kalkowski
* \date 2016-06-03
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__OS__RAM_SESSION_GUARD_H_
#define _INCLUDE__OS__RAM_SESSION_GUARD_H_
#include <base/ram_allocator.h>
#include <pd_session/capability.h>
namespace Genode { struct Ram_session_guard; }
class Genode::Ram_session_guard : public Genode::Ram_allocator
{
private:
Ram_allocator &_ram_alloc;
size_t _quota;
size_t _used = 0;
size_t _withdraw = 0;
public:
Ram_session_guard(Ram_allocator &ram_alloc, size_t quota)
: _ram_alloc(ram_alloc), _quota(quota) { }
/**
* Extend allocation limit
*/
void upgrade(size_t additional_amount) {
_quota += additional_amount; }
/**
* Consume bytes without actually allocating them
*/
bool withdraw(size_t size)
{
if ((_quota - _used) < size)
return false;
_used += size;
_withdraw += size;
return true;
}
/**
* Revert withdraw
*/
bool revert_withdraw(size_t size)
{
if (size > _withdraw)
return false;
_used -= size;
_withdraw -= size;
return true;
}
/*****************************
** Ram_allocator interface **
*****************************/
Ram_dataspace_capability alloc(size_t size,
Cache_attribute cached = CACHED) override
{
if (_used + size <= _used || _used + size > _quota)
throw Out_of_ram();
Ram_dataspace_capability cap = _ram_alloc.alloc(size, cached);
if (cap.valid())
_used += size;
return cap;
}
void free(Ram_dataspace_capability ds) override
{
size_t size = Dataspace_client(ds).size();
_ram_alloc.free(ds);
_used -= size;
}
size_t dataspace_size(Ram_dataspace_capability ds) const override
{
return _ram_alloc.dataspace_size(ds);
}
};
#endif /* _INCLUDE__OS__RAM_SESSION_GUARD_H_ */

View File

@ -35,6 +35,8 @@ class Genode::Reporter
private:
Env &_env;
Name const _xml_name;
Name const _label;
@ -45,10 +47,11 @@ class Genode::Reporter
struct Connection
{
Report::Connection report;
Attached_dataspace ds = { *env_deprecated()->rm_session(), report.dataspace() };
Attached_dataspace ds;
Connection(char const *name, size_t buffer_size)
: report(false, name, buffer_size) { }
Connection(Env &env, char const *name, size_t buffer_size)
: report(env, name, buffer_size), ds(env.rm(), report.dataspace())
{ }
};
Constructible<Connection> _conn { };
@ -65,23 +68,10 @@ class Genode::Reporter
public:
Reporter(Env &, char const *xml_name, char const *label = nullptr,
Reporter(Env &env, char const *xml_name, char const *label = nullptr,
size_t buffer_size = 4096)
:
_xml_name(xml_name), _label(label ? label : xml_name),
_buffer_size(buffer_size)
{ }
/**
* Constructor
*
* \deprecated
* \noapi
*/
Reporter(char const *xml_name, char const *label = nullptr,
size_t buffer_size = 4096) __attribute__((deprecated))
:
_xml_name(xml_name), _label(label ? label : xml_name),
_env(env), _xml_name(xml_name), _label(label ? label : xml_name),
_buffer_size(buffer_size)
{ }
@ -93,7 +83,7 @@ class Genode::Reporter
if (enabled == _enabled) return;
if (enabled)
_conn.construct(_label.string(), _buffer_size);
_conn.construct(_env, _label.string(), _buffer_size);
else
_conn.destruct();
@ -105,14 +95,6 @@ class Genode::Reporter
*/
bool enabled() const { return _enabled; }
/**
* Return true if reporter is enabled
*
* \noapi
* \deprecated use 'enabled' instead
*/
bool is_enabled() const { return enabled(); }
Name name() const { return _label; }
/**
@ -219,7 +201,9 @@ class Genode::Expanding_reporter
{
retry<Xml_generator::Buffer_exceeded>(
[&] () { _reporter->report(node.addr(), node.size()); },
[&] () {
node.with_raw_node([&] (char const *start, size_t length) {
_reporter->report(start, length); }); },
[&] () { _increase_report_buffer(); }
);

View File

@ -1,42 +0,0 @@
/*
* \brief Skeleton for implementing servers
* \author Norman Feske
* \date 2013-09-07
*/
/*
* Copyright (C) 2013-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__OS__SERVER_H_
#define _INCLUDE__OS__SERVER_H_
#include <base/entrypoint.h>
#include <os/signal_rpc_dispatcher.h>
namespace Server {
using namespace Genode;
void wait_and_dispatch_one_signal();
/***********************************************************
** Functions to be provided by the server implementation **
***********************************************************/
/*
* Avoid the ambiguity of 'size_t' if the header is included from
* libc-using code.
*/
Genode::size_t stack_size();
char const *name();
void construct(Entrypoint &);
}
#endif /* _INCLUDE__OS__SERVER_H_ */

View File

@ -1,69 +0,0 @@
/*
* \brief Utility for dispatching signals at at RPC entrypoint
* \author Norman Feske
* \date 2013-09-07
*
* \deprecated This header merely exists to maintain API compatibility
* to Genode 15.11. Its functionality moved to base/signal.h.
* The header will eventually be removed.
*/
/*
* Copyright (C) 2013-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_
#define _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_
#include <base/signal.h>
namespace Genode { template <typename, typename> class Signal_rpc_member; }
/**
* Signal dispatcher for handling signals by an object method
*
* This utility associates object methods with signals. It is intended to
* be used as a member variable of the class that handles incoming signals
* of a certain type. The constructor takes a pointer-to-member to the
* signal-handling method as argument. If a signal is received at the
* common signal reception code, this method will be invoked by calling
* 'Signal_dispatcher_base::dispatch'.
*
* \param T type of signal-handling class
* \param EP type of entrypoint handling signal RPC
*
* \deprecated this class template is superseded by the 'Signal_handler'
* in base/signal.h
*/
template <typename T, typename EP = Genode::Entrypoint>
struct Genode::Signal_rpc_member : Genode::Signal_dispatcher_base,
Genode::Signal_context_capability
{
EP &ep;
T &obj;
void (T::*member) (unsigned);
/**
* Constructor
*
* \param ep entrypoint managing this signal RPC
* \param obj,member object and method to call when
* the signal occurs
*/
Signal_rpc_member(EP &ep, T &obj, void (T::*member)(unsigned))
: Signal_context_capability(ep.manage(*this)),
ep(ep), obj(obj), member(member) { }
~Signal_rpc_member() { ep.dissolve(*this); }
/**
* Interface of Signal_dispatcher_base
*/
void dispatch(unsigned num) { (obj.*member)(num); }
};
#endif /* _INCLUDE__OS__SIGNAL_RPC_DISPATCHER_H_ */

View File

@ -30,17 +30,6 @@ struct Platform::Connection : Genode::Connection<Session>, Client
: Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=6K, cap_quota=%ld", CAP_QUOTA)),
Client(cap()) { }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated))
: Genode::Connection<Session>(session("ram_quota=6K")),
Client(cap()) { }
};
#endif /* _INCLUDE__PLATFORM_SESSION__CONNECTION_H_ */

View File

@ -23,19 +23,6 @@ namespace Regulator { struct Connection; }
struct Regulator::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Regulator::Session> _session(Genode::Parent &,
char const *label,
Regulator_id regulator)
{
return session("ram_quota=8K, cap_quota=%ld, regulator=\"%s\", label=\"%s\"",
CAP_QUOTA, regulator_name_by_id(regulator), label);
}
/**
* Constructor
*
@ -44,19 +31,10 @@ struct Regulator::Connection : Genode::Connection<Session>, Session_client
*/
Connection(Genode::Env &env, Regulator_id regulator, const char * label = "")
:
Genode::Connection<Session>(env, _session(env.parent(), label, regulator)),
Session_client(cap())
{ }
/**
* Constructor
*
* \param regulator identifier for the specific regulator
* \param label string identifier of the client
*/
Connection(Regulator_id regulator, const char * label = "") __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label, regulator)),
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=8K, cap_quota=%ld, regulator=\"%s\", label=\"%s\"",
CAP_QUOTA, regulator_name_by_id(regulator), label)),
Session_client(cap())
{ }
};

View File

@ -22,54 +22,16 @@ namespace Report { struct Connection; }
struct Report::Connection : Genode::Connection<Session>, Session_client
{
enum { RAM_QUOTA = 6*4096 }; /* value used for 'Slave::Connection' */
enum { RAM_QUOTA = 10*1024 }; /* value used for 'Slave::Connection' */
/**
* Issue session request
*
* \noapi
*/
Genode::Capability<Report::Session>
_session(Genode::Parent &parent, char const *label, size_t buffer_size)
{
return session(parent, "label=\"%s\", ram_quota=%ld, cap_quota=%ld, buffer_size=%zd",
label, 10*1024 + buffer_size, CAP_QUOTA, buffer_size);
}
/**
* Constructor
*/
Connection(Genode::Env &env, char const *label, size_t buffer_size = 4096)
:
Genode::Connection<Session>(env, _session(env.parent(), label, buffer_size)),
Session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(char const *label, size_t buffer_size = 4096) __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label, buffer_size)),
Session_client(cap())
{ }
/**
* Constructor
*
* \deprecated
* \noapi
*
* This variant solely exists to be called by deprecated functions. It
* will be removed as soon as those functions are gone.
*/
Connection(bool, char const *label, size_t buffer_size = 4096)
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label, buffer_size)),
Genode::Connection<Session>(env,
session(env.parent(),
"label=\"%s\", ram_quota=%ld, "
"cap_quota=%ld, buffer_size=%zd",
label, RAM_QUOTA + buffer_size,
CAP_QUOTA, buffer_size)),
Session_client(cap())
{ }
};

View File

@ -32,19 +32,6 @@ struct Rtc::Connection : Genode::Connection<Session>, Session_client
env, session(env.parent(), "ram_quota=8K, label=\"%s\"", label)),
Session_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated))
:
Genode::Connection<Rtc::Session>(session("ram_quota=8K")),
Session_client(cap())
{ }
};
#endif /* _INCLUDE__RTC_SESSION__CONNECTION_H_ */

View File

@ -70,20 +70,6 @@ class Framebuffer::Imx_connection : public Genode::Connection<Imx_session>,
mode.format())),
Imx_client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Imx_connection(unsigned width = 0,
unsigned height = 0,
Mode::Format format = Mode::INVALID) __attribute__((deprecated))
: Genode::Connection<Imx_session>(_connect(*Genode::env_deprecated()->parent(),
width, height, format)),
Imx_client(cap()) { }
};
#endif /* _INCLUDE__IMX_FRAMEBUFFER_SESSION__CONNECTION_H_ */

View File

@ -27,25 +27,12 @@ struct Platform::Connection : Genode::Connection<Session>, Client
*/
Connection(Genode::Env &env)
:
Genode::Connection<Session>(env, session("ram_quota=16K, cap_quota=%u",
Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=16K, cap_quota=%u",
CAP_QUOTA)),
Client(cap())
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=16K, cap_quota=%u",
CAP_QUOTA)),
Client(cap())
{ }
template <typename FUNC>
auto with_upgrade(FUNC func) -> decltype(func())
{

View File

@ -46,12 +46,6 @@ class Terminal::Session_client : public Genode::Rpc_client<Session>
_io_buffer(local_rm, call<Rpc_dataspace>())
{ }
Session_client(Genode::Capability<Session> cap) __attribute__((deprecated))
:
Genode::Rpc_client<Session>(cap),
_io_buffer(*Genode::env_deprecated()->rm_session(), call<Rpc_dataspace>())
{ }
Size size() override { return call<Rpc_size>(); }
bool avail() override { return call<Rpc_avail>(); }

View File

@ -56,22 +56,6 @@ struct Terminal::Connection : Genode::Connection<Session>, Session_client
{
wait_for_connection(cap());
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(char const *label = "") __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=%zd, label=\"%s\"",
2*4096, label)),
Session_client(*Genode::env_deprecated()->rm_session(), cap())
{
wait_for_connection(cap());
}
};
#endif /* _INCLUDE__TERMINAL_SESSION__CONNECTION_H_ */

View File

@ -34,11 +34,6 @@ class Uart::Session_client : public Genode::Rpc_client<Session>
Genode::Rpc_client<Session>(cap), _terminal(local_rm, cap)
{ }
Session_client(Genode::Capability<Session> cap) __attribute__((deprecated))
:
Genode::Rpc_client<Session>(cap), _terminal(*Genode::env_deprecated()->rm_session(), cap)
{ }
/********************
** UART interface **

View File

@ -32,21 +32,6 @@ struct Uart::Connection : Genode::Connection<Session>, Session_client
{
Terminal::Connection::wait_for_connection(cap());
}
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection() __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=%ld", 2*4096)),
Session_client(*Genode::env_deprecated()->rm_session(), cap())
{
Terminal::Connection::wait_for_connection(cap());
}
};
#endif /* _INCLUDE__UART_SESSION__CONNECTION_H_ */

View File

@ -95,12 +95,6 @@ class Usb::Endpoint : public Endpoint_descriptor
bool bulk() const { return (attributes & 0x3) == ENDPOINT_BULK; }
bool interrupt() const { return (attributes & 0x3) == ENDPOINT_INTERRUPT; }
/*
* \deprecated use 'bulk' and 'interrupt' instead
*/
bool is_bulk() const { return bulk(); }
bool is_interrupt() const { return interrupt(); }
void dump()
{
if (verbose_descr)
@ -331,7 +325,7 @@ class Usb::Interface : public Meta_data
{
_check();
if (!ep.is_bulk())
if (!ep.bulk())
throw Session::Invalid_endpoint();
p.type = Usb::Packet_descriptor::BULK;
@ -350,7 +344,7 @@ class Usb::Interface : public Meta_data
{
_check();
if (!ep.is_interrupt())
if (!ep.interrupt())
throw Session::Invalid_endpoint();
p.type = Usb::Packet_descriptor::IRQ;

View File

@ -22,19 +22,6 @@ namespace Usb { struct Connection; }
struct Usb::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Capability<Usb::Session> _session(Genode::Parent &parent,
char const *label,
Genode::size_t tx_buf_size)
{
return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
3 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label);
}
/**
* Constructor
*/
@ -45,26 +32,12 @@ struct Usb::Connection : Genode::Connection<Session>, Session_client
Genode::Signal_context_capability sigh_state_changed =
Genode::Signal_context_capability())
:
Genode::Connection<Session>(env, _session(env.parent(), label, tx_buf_size)),
Genode::Connection<Session>(env,
session(env.parent(),
"ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
3 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)),
Session_client(cap(), *tx_block_alloc, env.rm(), sigh_state_changed)
{ }
/**
* Constructor
*
* \noapi
* \deprecated Use the constructor with 'Env &' as first
* argument instead
*/
Connection(Genode::Range_allocator *tx_block_alloc,
char const *label = "",
Genode::size_t tx_buf_size = 512 * 1024,
Genode::Signal_context_capability sigh_state_changed =
Genode::Signal_context_capability()) __attribute__((deprecated))
:
Genode::Connection<Session>(_session(*Genode::env_deprecated()->parent(), label, tx_buf_size)),
Session_client(cap(), *tx_block_alloc, *Genode::env_deprecated()->rm_session(), sigh_state_changed)
{ }
};
#endif /* _INCLUDE__USB_SESSION__CONNECTION_H_ */

View File

@ -91,14 +91,6 @@ struct Usb::Packet_descriptor : Genode::Packet_descriptor
*/
bool read_transfer() { return transfer.ep & ENDPOINT_IN; }
/**
* Return true if packet is a read transfer
*
* \noapi
* \deprecated use 'read_transfer' instead
*/
bool is_read_transfer() { return read_transfer(); }
Packet_descriptor(off_t offset = 0, size_t size = 0)
: Genode::Packet_descriptor(offset, size) { }

View File

@ -30,12 +30,6 @@ struct Genode::Color
bool opaque() const { return a == 255; }
bool transparent() const { return a == 0; }
/*
* \deprecated use 'opaque' and 'transparent' instead
*/
bool is_opaque() const { return opaque(); }
bool is_transparent() const { return transparent(); }
Color(int red, int green, int blue, int alpha = 255)
: r(red), g(green), b(blue), a(alpha) { }

Some files were not shown because too many files have changed in this diff Show More