genode/repos/base/include/log_session/log_session.h
Norman Feske cfdbccc5c2 Remove blocking calls from root and parent RPCs
This is a redesign of the root and parent interfaces to eliminate
blocking RPC calls.

- New session representation at the parent (base/session_state.h)
- base-internal root proxy mechanism as migration path
- Redesign of base/service.h
- Removes ancient 'Connection::KEEP_OPEN' feature
- Interface change of 'Child', 'Child_policy', 'Slave', 'Slave_policy'
- New 'Slave::Connection'
- Changed child-construction procedure to be compatible with the
  non-blocking parent interface and to be easier to use
- The child's initial LOG session, its binary ROM session, and the
  linker ROM session have become part of the child's envirenment.
- Session upgrading must now be performed via 'env.upgrade' instead
  of performing a sole RPC call the parent. To make RAM upgrades
  easier, the 'Connection' provides a new 'upgrade_ram' method.

Issue #2120
2016-11-25 16:06:42 +01:00

59 lines
1.2 KiB
C++

/*
* \brief Log text output session interface
* \author Norman Feske
* \date 2006-09-15
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__LOG_SESSION__LOG_SESSION_H_
#define _INCLUDE__LOG_SESSION__LOG_SESSION_H_
#include <base/capability.h>
#include <base/stdint.h>
#include <base/rpc_args.h>
#include <session/session.h>
namespace Genode {
struct Log_session;
struct Log_session_client;
}
struct Genode::Log_session : Session
{
static const char *service_name() { return "LOG"; }
typedef Log_session_client Client;
virtual ~Log_session() { }
/* the lowest platform-specific maximum IPC payload size (OKL4) */
enum { MAX_STRING_LEN = 236};
typedef Rpc_in_buffer<MAX_STRING_LEN> String;
/**
* Output null-terminated string
*
* \return number of written characters
*/
virtual size_t write(String const &string) = 0;
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_write, size_t, write, String const &);
GENODE_RPC_INTERFACE(Rpc_write);
};
#endif /* _INCLUDE__LOG_SESSION__LOG_SESSION_H_ */