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:
Stefan Kalkowski 2015-03-11 11:09:45 +01:00 committed by Christian Helmuth
parent 358380046c
commit a168c9d6ce
12 changed files with 30 additions and 9 deletions

View File

@ -7,6 +7,7 @@ SRC_CC += \
ram_session_component.cc \ ram_session_component.cc \
ram_session_support.cc \ ram_session_support.cc \
rom_session_component.cc \ rom_session_component.cc \
cap_session_component.cc \
cpu_session_component.cc \ cpu_session_component.cc \
cpu_session_support.cc \ cpu_session_support.cc \
pd_session_component.cc \ pd_session_component.cc \
@ -41,6 +42,7 @@ include $(GEN_CORE_DIR)/version.inc
vpath main.cc $(GEN_CORE_DIR) vpath main.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath rom_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 cpu_session_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR) vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath rm_session_component.cc $(GEN_CORE_DIR) vpath rm_session_component.cc $(GEN_CORE_DIR)

View File

@ -7,6 +7,7 @@ SRC_CC += main.cc \
ram_session_component.cc \ ram_session_component.cc \
ram_session_support.cc \ ram_session_support.cc \
rom_session_component.cc \ rom_session_component.cc \
cap_session_component.cc \
cpu_session_component.cc \ cpu_session_component.cc \
cpu_session_support.cc \ cpu_session_support.cc \
pd_session_component.cc \ pd_session_component.cc \
@ -42,6 +43,7 @@ vpath main.cc $(GEN_CORE_DIR)
vpath multiboot_info.cc $(GEN_CORE_DIR) vpath multiboot_info.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath rom_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 cpu_session_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR) vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath rm_session_component.cc $(GEN_CORE_DIR) vpath rm_session_component.cc $(GEN_CORE_DIR)

View File

@ -22,10 +22,6 @@ namespace Genode {
class Cap_session_component : public Rpc_object<Cap_session> class Cap_session_component : public Rpc_object<Cap_session>
{ {
private:
static long _unique_id_cnt; /* TODO: remove this from generic core code */
public: public:
Cap_session_component(Allocator *md_alloc, const char *args) {} Cap_session_component(Allocator *md_alloc, const char *args) {}

View File

@ -19,6 +19,7 @@ INC_DIR += $(BASE_DIR)/src/platform
# add C++ sources # add C++ sources
SRC_CC += console.cc SRC_CC += console.cc
SRC_CC += cap_session_component.cc
SRC_CC += cpu_session_component.cc SRC_CC += cpu_session_component.cc
SRC_CC += cpu_session_support.cc SRC_CC += cpu_session_support.cc
SRC_CC += core_rm_session.cc SRC_CC += core_rm_session.cc

View File

@ -15,6 +15,7 @@
#define _CORE__INCLUDE__LINUX__CAP_SESSION_COMPONENT_H_ #define _CORE__INCLUDE__LINUX__CAP_SESSION_COMPONENT_H_
#include <cap_session/cap_session.h> #include <cap_session/cap_session.h>
#include <base/allocator.h>
#include <base/rpc_server.h> #include <base/rpc_server.h>
#include <base/lock.h> #include <base/lock.h>

View File

@ -11,6 +11,7 @@ SRC_CC = main.cc \
ram_session_component.cc \ ram_session_component.cc \
ram_session_support.cc \ ram_session_support.cc \
rom_session_component.cc \ rom_session_component.cc \
cap_session_component.cc \
cpu_session_component.cc \ cpu_session_component.cc \
cpu_session_extension.cc \ cpu_session_extension.cc \
cpu_session_support.cc \ cpu_session_support.cc \
@ -49,6 +50,7 @@ include $(GEN_CORE_DIR)/version.inc
vpath main.cc $(GEN_CORE_DIR) vpath main.cc $(GEN_CORE_DIR)
vpath ram_session_component.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 cpu_session_component.cc $(GEN_CORE_DIR)
vpath platform_services.cc $(GEN_CORE_DIR) vpath platform_services.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR) vpath signal_session_component.cc $(GEN_CORE_DIR)

View File

@ -27,8 +27,6 @@ namespace Genode {
{ {
private: private:
static long _unique_id_cnt;
struct Cap_object : List<Cap_object>::Element struct Cap_object : List<Cap_object>::Element
{ {
Genode::addr_t _cap_sel; Genode::addr_t _cap_sel;

View File

@ -8,6 +8,7 @@ SRC_CC += main.cc \
ram_session_component.cc \ ram_session_component.cc \
ram_session_support.cc \ ram_session_support.cc \
rom_session_component.cc \ rom_session_component.cc \
cap_session_component.cc \
cpu_session_component.cc \ cpu_session_component.cc \
cpu_session_support.cc \ cpu_session_support.cc \
pd_session_component.cc \ pd_session_component.cc \
@ -44,6 +45,7 @@ include $(GEN_CORE_DIR)/version.inc
vpath main.cc $(GEN_CORE_DIR) vpath main.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath rom_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 cpu_session_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR) vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath rm_session_component.cc $(GEN_CORE_DIR) vpath rm_session_component.cc $(GEN_CORE_DIR)

View File

@ -9,6 +9,7 @@ SRC_CC = main.cc \
ram_session_component.cc \ ram_session_component.cc \
ram_session_support.cc \ ram_session_support.cc \
rom_session_component.cc \ rom_session_component.cc \
cap_session_component.cc \
cpu_session_component.cc \ cpu_session_component.cc \
cpu_session_platform.cc \ cpu_session_platform.cc \
pd_session_component.cc \ pd_session_component.cc \
@ -41,6 +42,7 @@ include $(GEN_CORE_DIR)/version.inc
vpath main.cc $(GEN_CORE_DIR) vpath main.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR) vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath rom_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 cpu_session_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR) vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath rm_session_component.cc $(GEN_CORE_DIR) vpath rm_session_component.cc $(GEN_CORE_DIR)

View 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;

View File

@ -14,6 +14,7 @@
#ifndef _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_ #ifndef _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_
#define _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_ #define _CORE__INCLUDE__CAP_SESSION_COMPONENT_H_
#include <base/allocator.h>
#include <base/rpc_server.h> #include <base/rpc_server.h>
#include <base/lock.h> #include <base/lock.h>

View File

@ -38,9 +38,6 @@
using namespace Genode; using namespace Genode;
/* support for cap session component */
long Cap_session_component::_unique_id_cnt;
/* pool of provided core services */ /* pool of provided core services */
static Service_registry local_services; static Service_registry local_services;