mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 02:28:54 +00:00
core: remove global capability id counter
The global capability ID counter is not used by NOVA and Fiasco.OC and in the future not needed by base-hw too. Thereby, remove the static counter variable from the generic code base and add it where appropriated. Ref #1443
This commit is contained in:
parent
358380046c
commit
a168c9d6ce
@ -7,6 +7,7 @@ SRC_CC += \
|
||||
ram_session_component.cc \
|
||||
ram_session_support.cc \
|
||||
rom_session_component.cc \
|
||||
cap_session_component.cc \
|
||||
cpu_session_component.cc \
|
||||
cpu_session_support.cc \
|
||||
pd_session_component.cc \
|
||||
@ -41,6 +42,7 @@ include $(GEN_CORE_DIR)/version.inc
|
||||
vpath main.cc $(GEN_CORE_DIR)
|
||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rom_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cap_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath pd_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rm_session_component.cc $(GEN_CORE_DIR)
|
||||
|
@ -7,6 +7,7 @@ SRC_CC += main.cc \
|
||||
ram_session_component.cc \
|
||||
ram_session_support.cc \
|
||||
rom_session_component.cc \
|
||||
cap_session_component.cc \
|
||||
cpu_session_component.cc \
|
||||
cpu_session_support.cc \
|
||||
pd_session_component.cc \
|
||||
@ -42,6 +43,7 @@ vpath main.cc $(GEN_CORE_DIR)
|
||||
vpath multiboot_info.cc $(GEN_CORE_DIR)
|
||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rom_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cap_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath pd_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rm_session_component.cc $(GEN_CORE_DIR)
|
||||
|
@ -22,10 +22,6 @@ namespace Genode {
|
||||
|
||||
class Cap_session_component : public Rpc_object<Cap_session>
|
||||
{
|
||||
private:
|
||||
|
||||
static long _unique_id_cnt; /* TODO: remove this from generic core code */
|
||||
|
||||
public:
|
||||
|
||||
Cap_session_component(Allocator *md_alloc, const char *args) {}
|
||||
|
@ -19,6 +19,7 @@ INC_DIR += $(BASE_DIR)/src/platform
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += console.cc
|
||||
SRC_CC += cap_session_component.cc
|
||||
SRC_CC += cpu_session_component.cc
|
||||
SRC_CC += cpu_session_support.cc
|
||||
SRC_CC += core_rm_session.cc
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define _CORE__INCLUDE__LINUX__CAP_SESSION_COMPONENT_H_
|
||||
|
||||
#include <cap_session/cap_session.h>
|
||||
#include <base/allocator.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <base/lock.h>
|
||||
|
||||
|
@ -11,6 +11,7 @@ SRC_CC = main.cc \
|
||||
ram_session_component.cc \
|
||||
ram_session_support.cc \
|
||||
rom_session_component.cc \
|
||||
cap_session_component.cc \
|
||||
cpu_session_component.cc \
|
||||
cpu_session_extension.cc \
|
||||
cpu_session_support.cc \
|
||||
@ -49,6 +50,7 @@ include $(GEN_CORE_DIR)/version.inc
|
||||
|
||||
vpath main.cc $(GEN_CORE_DIR)
|
||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cap_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath platform_services.cc $(GEN_CORE_DIR)
|
||||
vpath signal_session_component.cc $(GEN_CORE_DIR)
|
||||
|
@ -27,8 +27,6 @@ namespace Genode {
|
||||
{
|
||||
private:
|
||||
|
||||
static long _unique_id_cnt;
|
||||
|
||||
struct Cap_object : List<Cap_object>::Element
|
||||
{
|
||||
Genode::addr_t _cap_sel;
|
||||
|
@ -8,6 +8,7 @@ SRC_CC += main.cc \
|
||||
ram_session_component.cc \
|
||||
ram_session_support.cc \
|
||||
rom_session_component.cc \
|
||||
cap_session_component.cc \
|
||||
cpu_session_component.cc \
|
||||
cpu_session_support.cc \
|
||||
pd_session_component.cc \
|
||||
@ -44,6 +45,7 @@ include $(GEN_CORE_DIR)/version.inc
|
||||
vpath main.cc $(GEN_CORE_DIR)
|
||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rom_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cap_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath pd_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rm_session_component.cc $(GEN_CORE_DIR)
|
||||
|
@ -9,6 +9,7 @@ SRC_CC = main.cc \
|
||||
ram_session_component.cc \
|
||||
ram_session_support.cc \
|
||||
rom_session_component.cc \
|
||||
cap_session_component.cc \
|
||||
cpu_session_component.cc \
|
||||
cpu_session_platform.cc \
|
||||
pd_session_component.cc \
|
||||
@ -41,6 +42,7 @@ include $(GEN_CORE_DIR)/version.inc
|
||||
vpath main.cc $(GEN_CORE_DIR)
|
||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rom_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cap_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath pd_session_component.cc $(GEN_CORE_DIR)
|
||||
vpath rm_session_component.cc $(GEN_CORE_DIR)
|
||||
|
17
repos/base/src/core/cap_session_component.cc
Normal file
17
repos/base/src/core/cap_session_component.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* \brief Core implementation of the Cap session interface
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2015-03-10
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 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.
|
||||
*/
|
||||
|
||||
/* core includes */
|
||||
#include <cap_session_component.h>
|
||||
|
||||
long Genode::Cap_session_component::_unique_id_cnt;
|
@ -14,6 +14,7 @@
|
||||
#ifndef _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_
|
||||
#define _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_
|
||||
|
||||
#include <base/allocator.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <base/lock.h>
|
||||
|
||||
|
@ -38,9 +38,6 @@
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
/* support for cap session component */
|
||||
long Cap_session_component::_unique_id_cnt;
|
||||
|
||||
/* pool of provided core services */
|
||||
static Service_registry local_services;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user