* Introduced new header directory headers/private/system which is supposed

to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-05-14 03:55:16 +00:00
parent 9b4fea7ee7
commit 6b202f4e3d
121 changed files with 504 additions and 360 deletions
@@ -1,17 +0,0 @@
/*
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_M68K_COMMPAGE_H
#define _KERNEL_ARCH_M68K_COMMPAGE_H
#ifndef _KERNEL_COMMPAGE_H
# error Must not be included directly. Include <commpage.h> instead!
#endif
#define COMMPAGE_ENTRY_M68K_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
#define COMMPAGE_ENTRY_M68K_MEMCPY (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1)
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
#endif /* _KERNEL_ARCH_M68K_COMMPAGE_H */
@@ -1,17 +0,0 @@
/*
* Copyright 2004, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_M68K_CONFIG_H
#define _KERNEL_ARCH_M68K_CONFIG_H
#define FUNCTION_CALL_PARAMETER_ALIGNMENT_TYPE unsigned int
#define STACK_GROWS_DOWNWARDS
//#define ATOMIC_FUNCS_ARE_SYSCALLS
//#define ATOMIC64_FUNCS_ARE_SYSCALLS
#endif /* _KERNEL_ARCH_M68K_CONFIG_H */
@@ -1,37 +0,0 @@
/*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#ifndef _KERNEL_ARCH_M68K_ELF_H
#define _KERNEL_ARCH_M68K_ELF_H
/* relocation types */
#define R_68K_NONE 0
#define R_68K_32 1 /* Direct 32 bit */
#define R_68K_16 2 /* Direct 16 bit */
#define R_68K_8 3 /* Direct 8 bit */
#define R_68K_PC32 4 /* PC relative 32 bit */
#define R_68K_PC16 5 /* PC relative 16 bit */
#define R_68K_PC8 6 /* PC relative 8 bit */
#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */
#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */
#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */
#define R_68K_GOT32O 10 /* 32 bit GOT offset */
#define R_68K_GOT16O 11 /* 16 bit GOT offset */
#define R_68K_GOT8O 12 /* 8 bit GOT offset */
#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */
#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */
#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */
#define R_68K_PLT32O 16 /* 32 bit PLT offset */
#define R_68K_PLT16O 17 /* 16 bit PLT offset */
#define R_68K_PLT8O 18 /* 8 bit PLT offset */
#define R_68K_COPY 19 /* Copy symbol at runtime */
#define R_68K_GLOB_DAT 20 /* Create GOT entry */
#define R_68K_JMP_SLOT 21 /* Create PLT entry */
#define R_68K_RELATIVE 22 /* Adjust by program base */
/* These are GNU extensions to enable C++ vtable garbage collection. */
#define R_68K_GNU_VTINHERIT 23
#define R_68K_GNU_VTENTRY 24
#endif /* _KERNEL_ARCH_M68K_ELF_H */
@@ -1,36 +0,0 @@
/*
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H
#define _KERNEL_ARCH_REAL_TIME_DATA_H
#include <StorageDefs.h>
#include <SupportDefs.h>
#warning M68K: fix system_time()
struct m68k_real_time_data {
vint64 system_time_offset;
};
struct arch_real_time_data {
struct m68k_real_time_data data[2];
vint32 system_time_conversion_factor;
vint32 version;
// Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one
// that doesn't involve a syscall), we can't have just a single
// system_time_offset and set/get it atomically.
// That's why have our data twice. One set is current (indexed by
// version % 2). When setting the offset, we do that with disabled
// interrupts and protected by a spinlock. We write the new values
// into the other array element and increment the version.
// A reader first reads the version, then the date of interest, and
// finally rechecks the version. If it hasn't changed in the meantime,
// the read value is fine, otherwise it runs the whole procedure again.
//
// system_time_conversion_factor is currently consider constant,
// although that is not necessarily true. We simply don't support
// changing conversion factors at the moment.
};
#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */
@@ -1,17 +0,0 @@
/*
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_PPC_COMMPAGE_H
#define _KERNEL_ARCH_PPC_COMMPAGE_H
#ifndef _KERNEL_COMMPAGE_H
# error Must not be included directly. Include <commpage.h> instead!
#endif
#define COMMPAGE_ENTRY_PPC_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
#define COMMPAGE_ENTRY_PPC_MEMCPY (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1)
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
#endif /* _KERNEL_ARCH_PPC_COMMPAGE_H */
@@ -1,17 +0,0 @@
/*
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_PPC_CONFIG_H
#define _KERNEL_ARCH_PPC_CONFIG_H
#define FUNCTION_CALL_PARAMETER_ALIGNMENT_TYPE unsigned int
#define STACK_GROWS_DOWNWARDS
//#define ATOMIC_FUNCS_ARE_SYSCALLS
#define ATOMIC64_FUNCS_ARE_SYSCALLS
#endif /* _KERNEL_ARCH_PPC_CONFIG_H */
@@ -1,49 +0,0 @@
/*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#ifndef _KERNEL_ARCH_PPC_ELF_H
#define _KERNEL_ARCH_PPC_ELF_H
/* relocation types */
#define R_PPC_NONE 0
#define R_PPC_ADDR32 1
#define R_PPC_ADDR24 2
#define R_PPC_ADDR16 3
#define R_PPC_ADDR16_LO 4
#define R_PPC_ADDR16_HI 5
#define R_PPC_ADDR16_HA 6
#define R_PPC_ADDR14 7
#define R_PPC_ADDR14_BRTAKEN 8
#define R_PPC_ADDR14_BRNTAKEN 9
#define R_PPC_REL24 10
#define R_PPC_REL14 11
#define R_PPC_REL14_BRTAKEN 12
#define R_PPC_REL14_BRNTAKEN 13
#define R_PPC_GOT16 14
#define R_PPC_GOT16_LO 15
#define R_PPC_GOT16_HI 16
#define R_PPC_GOT16_HA 17
#define R_PPC_PLTREL24 18
#define R_PPC_COPY 19
#define R_PPC_GLOB_DAT 20
#define R_PPC_JMP_SLOT 21
#define R_PPC_RELATIVE 22
#define R_PPC_LOCAL24PC 23
#define R_PPC_UADDR32 24
#define R_PPC_UADDR16 25
#define R_PPC_REL32 26
#define R_PPC_PLT32 27
#define R_PPC_PLTREL32 28
#define R_PPC_PLT16_LO 29
#define R_PPC_PLT16_HI 30
#define R_PPC_PLT16_HA 31
#define R_PPC_SDAREL16 32
#define R_PPC_SECTOFF 33
#define R_PPC_SECTOFF_LO 34
#define R_PPC_SECTOFF_HI 35
#define R_PPC_SECTOFF_HA 36
#define R_PPC_ADDR30 37
#endif /* _KERNEL_ARCH_PPC_ELF_H */
@@ -1,36 +0,0 @@
/*
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H
#define _KERNEL_ARCH_REAL_TIME_DATA_H
#include <StorageDefs.h>
#include <SupportDefs.h>
struct ppc_real_time_data {
vint64 system_time_offset;
};
struct arch_real_time_data {
struct ppc_real_time_data data[2];
vint32 system_time_conversion_factor;
vint32 version;
// Since there're no cheap atomic_{set,get,add}64() on PPC 32 (i.e. one
// that doesn't involve a syscall), we can't have just a single
// system_time_offset and set/get it atomically.
// That's why have our data twice. One set is current (indexed by
// version % 2). When setting the offset, we do that with disabled
// interrupts and protected by a spinlock. We write the new values
// into the other array element and increment the version.
// A reader first reads the version, then the date of interest, and
// finally rechecks the version. If it hasn't changed in the meantime,
// the read value is fine, otherwise it runs the whole procedure again.
//
// system_time_conversion_factor is currently consider constant,
// although that is not necessarily true. We simply don't support
// changing conversion factors at the moment.
};
#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */
+3 -12
View File
@@ -5,9 +5,11 @@
#ifndef KERNEL_APM_H
#define KERNEL_APM_H
#include <SupportDefs.h>
#include <apm_defs.h>
struct kernel_args;
@@ -47,17 +49,6 @@ typedef struct apm_info {
} apm_info;
// temporary generic syscall interface
#define APM_SYSCALLS "apm"
#define APM_GET_BATTERY_INFO 1
struct battery_info {
bool online;
int32 percent;
time_t time_left;
};
#ifndef _BOOT_MODE
#ifdef __cplusplus
extern "C" {
@@ -1,17 +0,0 @@
/*
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_x86_COMMPAGE_H
#define _KERNEL_ARCH_x86_COMMPAGE_H
#ifndef _KERNEL_COMMPAGE_H
# error Must not be included directly. Include <commpage.h> instead!
#endif
#define COMMPAGE_ENTRY_X86_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
#define COMMPAGE_ENTRY_X86_MEMCPY (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 1)
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
#endif /* _KERNEL_ARCH_x86_COMMPAGE_H */
@@ -1,15 +0,0 @@
/*
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_x86_CONFIG_H
#define _KERNEL_ARCH_x86_CONFIG_H
#define FUNCTION_CALL_PARAMETER_ALIGNMENT_TYPE unsigned int
#define STACK_GROWS_DOWNWARDS
//#define ATOMIC_FUNCS_ARE_SYSCALLS
//#define ATOMIC64_FUNCS_ARE_SYSCALLS
#endif /* _KERNEL_ARCH_x86_CONFIG_H */
@@ -1,22 +0,0 @@
/*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#ifndef _KERNEL_ARCH_x86_ELF_H
#define _KERNEL_ARCH_x86_ELF_H
/* relocation types */
#define R_386_NONE 0
#define R_386_32 1 /* add symbol value */
#define R_386_PC32 2 /* add PC relative symbol value */
#define R_386_GOT32 3 /* add PC relative GOT offset */
#define R_386_PLT32 4 /* add PC relative PLT offset */
#define R_386_COPY 5 /* copy data from shared object */
#define R_386_GLOB_DAT 6 /* set GOT entry to data address */
#define R_386_JMP_SLOT 7 /* set GOT entry to code address */
#define R_386_RELATIVE 8 /* add load address of shared object */
#define R_386_GOTOFF 9 /* add GOT relative symbol address */
#define R_386_GOTPC 10 /* add PC relative GOT table address */
#endif /* _KERNEL_ARCH_x86_ELF_H */
@@ -1,17 +0,0 @@
/*
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H
#define _KERNEL_ARCH_REAL_TIME_DATA_H
#include <StorageDefs.h>
#include <SupportDefs.h>
struct arch_real_time_data {
bigtime_t system_time_offset;
uint32 system_time_conversion_factor;
};
#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */