2016-03-18 21:53:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Receive window for capability selectors
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2016-03-22
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2016-2017 Genode Labs GmbH
|
2016-03-18 21:53:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-03-18 21:53:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__FOC__RECEIVE_WINDOW_H_
|
|
|
|
#define _INCLUDE__FOC__RECEIVE_WINDOW_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <base/stdint.h>
|
|
|
|
#include <base/ipc_msgbuf.h>
|
|
|
|
|
|
|
|
namespace Genode { struct Receive_window; }
|
|
|
|
|
|
|
|
|
|
|
|
class Genode::Receive_window
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base of capability receive window.
|
|
|
|
*/
|
2016-06-15 13:04:54 +00:00
|
|
|
Native_capability::Data * _rcv_idx_base = nullptr;
|
2016-03-18 21:53:25 +00:00
|
|
|
|
|
|
|
enum { MAX_CAPS_PER_MSG = Msgbuf_base::MAX_CAPS_PER_MSG };
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Receive_window() { }
|
|
|
|
|
2016-06-15 13:04:54 +00:00
|
|
|
~Receive_window();
|
2016-03-18 21:53:25 +00:00
|
|
|
|
2016-06-15 13:04:54 +00:00
|
|
|
void init();
|
2016-03-18 21:53:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return address of capability receive window
|
|
|
|
*/
|
2016-06-15 13:04:54 +00:00
|
|
|
addr_t rcv_cap_sel_base();
|
2016-03-18 21:53:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return received selector with index i
|
|
|
|
*
|
|
|
|
* \return capability selector, or 0 if index is invalid
|
|
|
|
*/
|
2016-06-15 13:04:54 +00:00
|
|
|
addr_t rcv_cap_sel(unsigned i);
|
2016-03-18 21:53:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__FOC__RECEIVE_WINDOW_H_ */
|