Skip to content

Commit

Permalink
base: new header structure for native_capability.h
Browse files Browse the repository at this point in the history
This patch prepares the unification of the capability types across the
various base platforms. The template that is used on most traditional
(non-capability) kernels has been moved to native_types_tpl.h for now.
Once all platforms use the new type (which will resemble the definition
currently used on base-sel4), we will remove the template.

Issue genodelabs#1832
  • Loading branch information
nfeske committed Jan 27, 2016
1 parent b7959dc commit 2456efd
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion repos/base-fiasco/include/base/native_types.h
Expand Up @@ -14,7 +14,7 @@
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>

namespace Fiasco {
Expand Down
3 changes: 2 additions & 1 deletion repos/base-linux/include/base/native_types.h
Expand Up @@ -15,7 +15,7 @@
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <util/string.h>
#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>

/*
Expand Down Expand Up @@ -44,6 +44,7 @@ namespace Genode {
Native_thread_id() : tid(0), pid(0) { }
Native_thread_id(unsigned int tid, unsigned int pid)
: tid(tid), pid(pid) { }
/* NOVA-specific Genode includes */
};

struct Thread_meta_data;
Expand Down
4 changes: 3 additions & 1 deletion repos/base-nova/include/base/native_types.h
Expand Up @@ -15,11 +15,13 @@
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <base/native_capability.h>
/* Genode includes */
#include <base/stdint.h>

/* NOVA includes */
#include <nova/syscalls.h>

/* NOVA-specific Genode includes */
#include <base/cap_map.h>

namespace Genode {
Expand Down
2 changes: 1 addition & 1 deletion repos/base-okl4/include/base/native_types.h
Expand Up @@ -14,7 +14,7 @@
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>

namespace Okl4 { extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion repos/base-pistachio/include/base/native_types.h
Expand Up @@ -14,7 +14,7 @@
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <base/native_capability.h>
#include <base/native_capability_tpl.h>
#include <base/stdint.h>

namespace Pistachio {
Expand Down
1 change: 0 additions & 1 deletion repos/base-sel4/include/base/native_types.h
Expand Up @@ -15,7 +15,6 @@
#define _INCLUDE__BASE__NATIVE_TYPES_H_

#include <base/stdint.h>
#include <base/native_capability.h>

namespace Genode {

Expand Down
Expand Up @@ -6,6 +6,8 @@
* This file is a generic variant of the Native_capability, which is
* suitable many platforms such as Fiasco, Pistachio, OKL4, Linux,
* and some more.
*
* \deprecated
*/

/*
Expand All @@ -15,8 +17,8 @@
* under the terms of the GNU General Public License version 2.
*/

#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_H_
#ifndef _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_
#define _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_

namespace Genode { template <typename> class Native_capability_tpl; }

Expand Down Expand Up @@ -115,4 +117,4 @@ class Genode::Native_capability_tpl
Dst dst() const { return _dst; }
};

#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_TPL_H_ */

0 comments on commit 2456efd

Please sign in to comment.