* 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:
@@ -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" {
|
||||
|
||||
@@ -5,32 +5,11 @@
|
||||
#ifndef _KERNEL_COMMPAGE_H
|
||||
#define _KERNEL_COMMPAGE_H
|
||||
|
||||
/*! Some systemwide commpage constants, used in the kernel and libroot */
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#ifndef _ASSEMBLER
|
||||
# include <SupportDefs.h>
|
||||
#endif
|
||||
#include <commpage_defs.h>
|
||||
|
||||
|
||||
/* be careful what you put here, this file is included from assembly */
|
||||
#define COMMPAGE_ENTRY_MAGIC 0
|
||||
#define COMMPAGE_ENTRY_VERSION 1
|
||||
#define COMMPAGE_ENTRY_REAL_TIME_DATA 2
|
||||
#define COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC 3
|
||||
|
||||
#define COMMPAGE_SIZE (0x8000)
|
||||
#define COMMPAGE_TABLE_ENTRIES 64
|
||||
|
||||
#define COMMPAGE_SIGNATURE 'COMM'
|
||||
#define COMMPAGE_VERSION 1
|
||||
|
||||
#define USER_COMMPAGE_ADDR ARCH_USER_COMMPAGE_ADDR
|
||||
// set by the architecture specific implementation
|
||||
|
||||
#ifndef _ASSEMBLER
|
||||
|
||||
#define USER_COMMPAGE_TABLE ((void**)(USER_COMMPAGE_ADDR))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -46,8 +25,4 @@ status_t arch_commpage_init(void);
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // ! _ASSEMBLER
|
||||
|
||||
#include <arch_commpage.h>
|
||||
|
||||
#endif /* _KERNEL_COMMPAGE_H */
|
||||
|
||||
@@ -12,62 +12,14 @@
|
||||
|
||||
#include <DiskDeviceDefs.h>
|
||||
|
||||
#include <ddm_userland_interface_defs.h>
|
||||
#include <disk_device_manager.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// userland partition representation
|
||||
typedef struct user_partition_data user_partition_data;
|
||||
struct user_partition_data {
|
||||
partition_id id;
|
||||
off_t offset;
|
||||
off_t size;
|
||||
off_t content_size;
|
||||
uint32 block_size;
|
||||
uint32 status;
|
||||
uint32 flags;
|
||||
dev_t volume;
|
||||
int32 index;
|
||||
int32 change_counter; // needed?
|
||||
disk_system_id disk_system;
|
||||
char *name;
|
||||
char *content_name;
|
||||
char *type;
|
||||
char *content_type;
|
||||
char *parameters;
|
||||
char *content_parameters;
|
||||
void *user_data;
|
||||
int32 child_count;
|
||||
user_partition_data *children[1];
|
||||
};
|
||||
|
||||
// userland disk device representation
|
||||
typedef struct user_disk_device_data {
|
||||
uint32 device_flags;
|
||||
char *path;
|
||||
user_partition_data device_partition_data;
|
||||
} user_disk_device_data;
|
||||
|
||||
// userland disk system representation
|
||||
typedef struct user_disk_system_info {
|
||||
disk_system_id id;
|
||||
char name[B_FILE_NAME_LENGTH]; // better B_PATH_NAME_LENGTH?
|
||||
char short_name[B_OS_NAME_LENGTH];
|
||||
char pretty_name[B_OS_NAME_LENGTH];
|
||||
uint32 flags;
|
||||
} user_disk_system_info;
|
||||
|
||||
// userland disk device job representation
|
||||
typedef struct user_disk_device_job_info {
|
||||
disk_job_id id;
|
||||
uint32 type;
|
||||
partition_id partition;
|
||||
char description[256];
|
||||
} user_disk_device_job_info;
|
||||
|
||||
|
||||
/*! Syscalls entries */
|
||||
|
||||
// iterating, retrieving device/partition data
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <generic_syscall_defs.h>
|
||||
|
||||
|
||||
/* If we decide to make this API public, the contents of this file
|
||||
* should be moved to KernelExport.h
|
||||
@@ -15,11 +17,6 @@
|
||||
|
||||
typedef status_t (*syscall_hook)(const char *subsystem, uint32 function, void *buffer, size_t bufferSize);
|
||||
|
||||
/* predefined functions */
|
||||
#define B_RESERVED_SYSCALL_BASE 0x80000000
|
||||
#define B_SYSCALL_INFO (B_RESERVED_SYSCALL_BASE)
|
||||
// gets a minimum version uint32, and fills it with the current version on return
|
||||
|
||||
/* syscall flags */
|
||||
#define B_SYSCALL_NOT_REPLACEABLE 1
|
||||
#define B_DO_NOT_REPLACE_SYSCALL 2
|
||||
|
||||
@@ -34,13 +34,6 @@
|
||||
#endif
|
||||
#define KERNEL_STACK_GUARD_PAGES 1
|
||||
|
||||
/** Size of the stack given to teams in user space */
|
||||
#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB
|
||||
#define USER_STACK_SIZE (256 * 1024) // 256 kB
|
||||
#define MIN_USER_STACK_SIZE (4 * 1024) // 4 KB
|
||||
#define MAX_USER_STACK_SIZE (16 * 1024 * 1024) // 16 MB
|
||||
#define USER_STACK_GUARD_PAGES 4 // 16 kB
|
||||
|
||||
/** Size of the environmental variables space for a process */
|
||||
#define ENV_SIZE (B_PAGE_SIZE * 8)
|
||||
|
||||
|
||||
@@ -11,15 +11,12 @@
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <posix/realtime_sem_defs.h>
|
||||
|
||||
|
||||
struct realtime_sem_context;
|
||||
|
||||
|
||||
#define MAX_POSIX_SEMS_PER_TEAM 128
|
||||
#define MAX_POSIX_SEMS 1024
|
||||
#define MAX_POSIX_SEM_VALUE INT_MAX
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void realtime_sem_init();
|
||||
|
||||
@@ -5,20 +5,9 @@
|
||||
#ifndef _KERNEL_SAFEMODE_H
|
||||
#define _KERNEL_SAFEMODE_H
|
||||
|
||||
|
||||
#include <driver_settings.h>
|
||||
|
||||
|
||||
// these are BeOS compatible additions to the safemode
|
||||
// constants in the driver_settings.h header
|
||||
|
||||
#define B_SAFEMODE_DISABLE_USER_ADD_ONS "disableuseraddons"
|
||||
#define B_SAFEMODE_DISABLE_IDE_DMA "disableidedma"
|
||||
#define B_SAFEMODE_DISABLE_ACPI "disable_acpi"
|
||||
#define B_SAFEMODE_DISABLE_APM "disable_apm"
|
||||
#define B_SAFEMODE_DISABLE_SMP "disable_smp"
|
||||
#define B_SAFEMODE_DISABLE_HYPER_THREADING "disable_hyperthreading"
|
||||
#define B_SAFEMODE_FAIL_SAFE_VIDEO_MODE "fail_safe_video_mode"
|
||||
#include <safemode_defs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -22,20 +22,6 @@ struct kernel_args;
|
||||
struct select_info;
|
||||
struct thread_creation_attributes;
|
||||
|
||||
struct thread_creation_attributes {
|
||||
int32 (*entry)(thread_func, void *);
|
||||
const char* name;
|
||||
int32 priority;
|
||||
void* args1;
|
||||
void* args2;
|
||||
void* stack_address;
|
||||
size_t stack_size;
|
||||
|
||||
// when calling kernel only
|
||||
team_id team;
|
||||
thread_id thread;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <cbuf.h>
|
||||
#include <smp.h>
|
||||
#include <signal.h>
|
||||
#include <thread_defs.h>
|
||||
#include <timer.h>
|
||||
#include <user_debugger.h>
|
||||
#include <util/list.h>
|
||||
@@ -50,11 +51,6 @@ typedef enum job_control_state {
|
||||
JOB_CONTROL_STATE_DEAD
|
||||
} job_control_state;
|
||||
|
||||
#define THREAD_RETURN_EXIT 0x1
|
||||
#define THREAD_RETURN_INTERRUPTED 0x2
|
||||
#define THREAD_STOPPED 0x3
|
||||
#define THREAD_CONTINUED 0x4
|
||||
|
||||
// The type of object a thread blocks on (thread::wait::type, set by
|
||||
// thread_prepare_to_block()).
|
||||
enum {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <vfs_defs.h>
|
||||
|
||||
|
||||
#define DEFAULT_FD_TABLE_SIZE 256
|
||||
#define MAX_FD_TABLE_SIZE 8192
|
||||
@@ -54,13 +56,6 @@ typedef struct io_context {
|
||||
uint32 max_monitors;
|
||||
} io_context;
|
||||
|
||||
struct fd_info {
|
||||
int number;
|
||||
int32 open_mode;
|
||||
dev_t device;
|
||||
ino_t node;
|
||||
};
|
||||
|
||||
/* macro to allocate a iovec array on the stack */
|
||||
#define IOVECS(name, size) \
|
||||
uint8 _##name[sizeof(iovecs) + (size)*sizeof(iovec)]; \
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#ifndef _KERNEL_VM_H
|
||||
#define _KERNEL_VM_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <arch/vm.h>
|
||||
|
||||
#include <OS.h>
|
||||
#include <vm_defs.h>
|
||||
|
||||
|
||||
struct kernel_args;
|
||||
@@ -23,63 +23,6 @@ struct vm_address_space;
|
||||
struct vnode;
|
||||
|
||||
|
||||
// additional protection flags
|
||||
// Note: the VM probably won't support all combinations - it will try
|
||||
// its best, but create_area() will fail if it has to.
|
||||
// Of course, the exact behaviour will be documented somewhere...
|
||||
#define B_EXECUTE_AREA 0x04
|
||||
#define B_STACK_AREA 0x08
|
||||
// "stack" protection is not available on most platforms - it's used
|
||||
// to only commit memory as needed, and have guard pages at the
|
||||
// bottom of the stack.
|
||||
// "execute" protection is currently ignored, but nevertheless, you
|
||||
// should use it if you require to execute code in that area.
|
||||
|
||||
#define B_KERNEL_EXECUTE_AREA 0x40
|
||||
#define B_KERNEL_STACK_AREA 0x80
|
||||
|
||||
#define B_USER_PROTECTION \
|
||||
(B_READ_AREA | B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA)
|
||||
#define B_KERNEL_PROTECTION \
|
||||
(B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_KERNEL_EXECUTE_AREA \
|
||||
| B_KERNEL_STACK_AREA)
|
||||
|
||||
// TODO: These aren't really a protection flags, but since the "protection"
|
||||
// field is the only flag field, we currently use it for this.
|
||||
// A cleaner approach would be appreciated - maybe just an official generic
|
||||
// flags region in the protection field.
|
||||
#define B_OVERCOMMITTING_AREA 0x1000
|
||||
#define B_SHARED_AREA 0x2000
|
||||
#define B_KERNEL_AREA 0x4000
|
||||
// Usable from userland according to its protection flags, but the area
|
||||
// itself is not deletable, resizable, etc from userland.
|
||||
|
||||
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
|
||||
#define B_KERNEL_AREA_FLAGS \
|
||||
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA \
|
||||
| B_SHARED_AREA)
|
||||
|
||||
// flags for vm_get_physical_page()
|
||||
enum {
|
||||
PHYSICAL_PAGE_NO_WAIT = 0,
|
||||
PHYSICAL_PAGE_CAN_WAIT,
|
||||
};
|
||||
|
||||
// mapping argument for several internal VM functions
|
||||
enum {
|
||||
REGION_NO_PRIVATE_MAP = 0,
|
||||
REGION_PRIVATE_MAP
|
||||
};
|
||||
|
||||
enum {
|
||||
// ToDo: these are here only temporarily - it's a private
|
||||
// addition to the BeOS create_area() lock flags
|
||||
B_ALREADY_WIRED = 6,
|
||||
};
|
||||
|
||||
#define MEMORY_TYPE_SHIFT 28
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -8,15 +8,8 @@
|
||||
#include <OS.h>
|
||||
#include <TLS.h>
|
||||
|
||||
#include <tls.h> /* kernel header */
|
||||
|
||||
|
||||
struct user_thread {
|
||||
int32 defer_signals; // counter; 0 == signals allowed
|
||||
uint32 pending_signals; // signals that are pending, when
|
||||
// signals are deferred
|
||||
status_t wait_status;
|
||||
};
|
||||
#include <tls.h>
|
||||
#include <user_thread_defs.h>
|
||||
|
||||
|
||||
static inline user_thread*
|
||||
|
||||
+5
-5
@@ -2,11 +2,11 @@
|
||||
* 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 _SYSTEM_ARCH_M68K_COMMPAGE_DEFS_H
|
||||
#define _SYSTEM_ARCH_M68K_COMMPAGE_DEFS_H
|
||||
|
||||
#ifndef _KERNEL_COMMPAGE_H
|
||||
# error Must not be included directly. Include <commpage.h> instead!
|
||||
#ifndef _SYSTEM_COMMPAGE_DEFS_H
|
||||
# error Must not be included directly. Include <commpage_defs.h> instead!
|
||||
#endif
|
||||
|
||||
#define COMMPAGE_ENTRY_M68K_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
|
||||
|
||||
#endif /* _KERNEL_ARCH_M68K_COMMPAGE_H */
|
||||
#endif /* _SYSTEM_ARCH_M68K_COMMPAGE_DEFS_H */
|
||||
+5
-5
@@ -2,11 +2,11 @@
|
||||
* 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 _SYSTEM_ARCH_PPC_COMMPAGE_DEFS_H
|
||||
#define _SYSTEM_ARCH_PPC_COMMPAGE_DEFS_H
|
||||
|
||||
#ifndef _KERNEL_COMMPAGE_H
|
||||
# error Must not be included directly. Include <commpage.h> instead!
|
||||
#ifndef _SYSTEM_COMMPAGE_DEFS_H
|
||||
# error Must not be included directly. Include <commpage_defs.h> instead!
|
||||
#endif
|
||||
|
||||
#define COMMPAGE_ENTRY_PPC_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
|
||||
|
||||
#endif /* _KERNEL_ARCH_PPC_COMMPAGE_H */
|
||||
#endif /* _SYSTEM_ARCH_PPC_COMMPAGE_DEFS_H */
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SYSTEM_ARCH_X86_APM_DEFS_H
|
||||
#define SYSTEM_ARCH_X86_APM_DEFS_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
|
||||
#endif /* SYSTEM_ARCH_X86_APM_DEFS_H */
|
||||
+5
-5
@@ -2,11 +2,11 @@
|
||||
* 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 _SYSTEM_ARCH_x86_COMMPAGE_DEFS_H
|
||||
#define _SYSTEM_ARCH_x86_COMMPAGE_DEFS_H
|
||||
|
||||
#ifndef _KERNEL_COMMPAGE_H
|
||||
# error Must not be included directly. Include <commpage.h> instead!
|
||||
#ifndef _SYSTEM_COMMPAGE_DEFS_H
|
||||
# error Must not be included directly. Include <commpage_defs.h> instead!
|
||||
#endif
|
||||
|
||||
#define COMMPAGE_ENTRY_X86_SYSCALL (COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC + 0)
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
#define ARCH_USER_COMMPAGE_ADDR (0xffff0000)
|
||||
|
||||
#endif /* _KERNEL_ARCH_x86_COMMPAGE_H */
|
||||
#endif /* _SYSTEM_ARCH_x86_COMMPAGE_DEFS_H */
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_COMMPAGE_DEFS_H
|
||||
#define _SYSTEM_COMMPAGE_DEFS_H
|
||||
|
||||
/*! Some systemwide commpage constants, used in the kernel and libroot */
|
||||
|
||||
/* be careful what you put here, this file is included from assembly */
|
||||
#define COMMPAGE_ENTRY_MAGIC 0
|
||||
#define COMMPAGE_ENTRY_VERSION 1
|
||||
#define COMMPAGE_ENTRY_REAL_TIME_DATA 2
|
||||
#define COMMPAGE_ENTRY_FIRST_ARCH_SPECIFIC 3
|
||||
|
||||
#define COMMPAGE_SIZE (0x8000)
|
||||
#define COMMPAGE_TABLE_ENTRIES 64
|
||||
|
||||
#define COMMPAGE_SIGNATURE 'COMM'
|
||||
#define COMMPAGE_VERSION 1
|
||||
|
||||
#define USER_COMMPAGE_ADDR ARCH_USER_COMMPAGE_ADDR
|
||||
// set by the architecture specific implementation
|
||||
|
||||
#define USER_COMMPAGE_TABLE ((void**)(USER_COMMPAGE_ADDR))
|
||||
|
||||
#include <arch_commpage_defs.h>
|
||||
|
||||
#endif /* _SYSTEM_COMMPAGE_DEFS_H */
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2003-2008, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Ingo Weinhold, bonefish@users.sf.net
|
||||
*/
|
||||
#ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
||||
#define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <DiskDeviceDefs.h>
|
||||
|
||||
|
||||
// userland partition representation
|
||||
typedef struct user_partition_data user_partition_data;
|
||||
struct user_partition_data {
|
||||
partition_id id;
|
||||
off_t offset;
|
||||
off_t size;
|
||||
off_t content_size;
|
||||
uint32 block_size;
|
||||
uint32 status;
|
||||
uint32 flags;
|
||||
dev_t volume;
|
||||
int32 index;
|
||||
int32 change_counter; // needed?
|
||||
disk_system_id disk_system;
|
||||
char *name;
|
||||
char *content_name;
|
||||
char *type;
|
||||
char *content_type;
|
||||
char *parameters;
|
||||
char *content_parameters;
|
||||
void *user_data;
|
||||
int32 child_count;
|
||||
user_partition_data *children[1];
|
||||
};
|
||||
|
||||
// userland disk device representation
|
||||
typedef struct user_disk_device_data {
|
||||
uint32 device_flags;
|
||||
char *path;
|
||||
user_partition_data device_partition_data;
|
||||
} user_disk_device_data;
|
||||
|
||||
// userland disk system representation
|
||||
typedef struct user_disk_system_info {
|
||||
disk_system_id id;
|
||||
char name[B_FILE_NAME_LENGTH]; // better B_PATH_NAME_LENGTH?
|
||||
char short_name[B_OS_NAME_LENGTH];
|
||||
char pretty_name[B_OS_NAME_LENGTH];
|
||||
uint32 flags;
|
||||
} user_disk_system_info;
|
||||
|
||||
// userland disk device job representation
|
||||
typedef struct user_disk_device_job_info {
|
||||
disk_job_id id;
|
||||
uint32 type;
|
||||
partition_id partition;
|
||||
char description[256];
|
||||
} user_disk_device_job_info;
|
||||
|
||||
|
||||
#endif // _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <SupportDefs.h>
|
||||
#include <ByteOrder.h>
|
||||
|
||||
#include <arch/elf.h>
|
||||
#include <arch_elf.h>
|
||||
|
||||
|
||||
typedef uint32 Elf32_Addr;
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_GENERIC_SYSCALLS_DEFS_H
|
||||
#define _SYSTEM_GENERIC_SYSCALLS_DEFS_H
|
||||
|
||||
|
||||
/* predefined functions */
|
||||
#define B_RESERVED_SYSCALL_BASE 0x80000000
|
||||
#define B_SYSCALL_INFO (B_RESERVED_SYSCALL_BASE)
|
||||
// gets a minimum version uint32, and fills it with the current version on
|
||||
// return
|
||||
|
||||
|
||||
#endif /* _SYSTEM_GENERIC_SYSCALLS_DEFS_H */
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SYSTEM_REALTIME_SEM_H
|
||||
#define SYSTEM_REALTIME_SEM_H
|
||||
|
||||
#define MAX_POSIX_SEMS_PER_TEAM 128
|
||||
#define MAX_POSIX_SEMS 1024
|
||||
#define MAX_POSIX_SEM_VALUE INT_MAX
|
||||
|
||||
#endif // SYSTEM_REALTIME_SEM_H
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2004-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_SAFEMODE_DEFS_H
|
||||
#define _SYSTEM_SAFEMODE_DEFS_H
|
||||
|
||||
|
||||
// these are BeOS compatible additions to the safemode
|
||||
// constants in the driver_settings.h header
|
||||
|
||||
#define B_SAFEMODE_DISABLE_USER_ADD_ONS "disableuseraddons"
|
||||
#define B_SAFEMODE_DISABLE_IDE_DMA "disableidedma"
|
||||
#define B_SAFEMODE_DISABLE_ACPI "disable_acpi"
|
||||
#define B_SAFEMODE_DISABLE_APM "disable_apm"
|
||||
#define B_SAFEMODE_DISABLE_SMP "disable_smp"
|
||||
#define B_SAFEMODE_DISABLE_HYPER_THREADING "disable_hyperthreading"
|
||||
#define B_SAFEMODE_FAIL_SAFE_VIDEO_MODE "fail_safe_video_mode"
|
||||
|
||||
|
||||
#endif /* _SYSTEM_SAFEMODE_DEFS_H */
|
||||
+3
-3
@@ -2,8 +2,8 @@
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
#ifndef _KERNEL_SYSCALL_PROCESS_INFO_H
|
||||
#define _KERNEL_SYSCALL_PROCESS_INFO_H
|
||||
#ifndef _SYSTEM_SYSCALL_PROCESS_INFO_H
|
||||
#define _SYSTEM_SYSCALL_PROCESS_INFO_H
|
||||
|
||||
enum which_process_info {
|
||||
SESSION_ID = 1,
|
||||
@@ -11,4 +11,4 @@ enum which_process_info {
|
||||
PARENT_ID,
|
||||
};
|
||||
|
||||
#endif /* _KRENEL_SYSCALL_PROCESS_INFO_H */
|
||||
#endif /* _SYSTEM_SYSCALL_PROCESS_INFO_H */
|
||||
@@ -2,8 +2,8 @@
|
||||
* Copyright 2004-2008, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_SYSCALLS_H
|
||||
#define _KERNEL_SYSCALLS_H
|
||||
#ifndef _SYSTEM_SYSCALLS_H
|
||||
#define _SYSTEM_SYSCALLS_H
|
||||
|
||||
|
||||
#include <arch_config.h>
|
||||
@@ -487,4 +487,4 @@ status_t stop_disk_device_watching(port_id, int32 token);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL_SYSCALLS_H */
|
||||
#endif /* _SYSTEM_SYSCALLS_H */
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_THREAD_DEFS_H
|
||||
#define _SYSTEM_THREAD_DEFS_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
|
||||
#define THREAD_RETURN_EXIT 0x1
|
||||
#define THREAD_RETURN_INTERRUPTED 0x2
|
||||
#define THREAD_STOPPED 0x3
|
||||
#define THREAD_CONTINUED 0x4
|
||||
|
||||
/** Size of the stack given to teams in user space */
|
||||
#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB
|
||||
#define USER_STACK_SIZE (256 * 1024) // 256 kB
|
||||
#define MIN_USER_STACK_SIZE (4 * 1024) // 4 KB
|
||||
#define MAX_USER_STACK_SIZE (16 * 1024 * 1024) // 16 MB
|
||||
#define USER_STACK_GUARD_PAGES 4 // 16 kB
|
||||
|
||||
|
||||
struct thread_creation_attributes {
|
||||
int32 (*entry)(thread_func, void *);
|
||||
const char* name;
|
||||
int32 priority;
|
||||
void* args1;
|
||||
void* args2;
|
||||
void* stack_address;
|
||||
size_t stack_size;
|
||||
|
||||
// when calling from kernel only
|
||||
team_id team;
|
||||
thread_id thread;
|
||||
};
|
||||
|
||||
#endif /* _SYSTEM_THREAD_DEFS_H */
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_USER_THREAD_DEFS_H
|
||||
#define _SYSTEM_USER_THREAD_DEFS_H
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
struct user_thread {
|
||||
int32 defer_signals; // counter; 0 == signals allowed
|
||||
uint32 pending_signals; // signals that are pending, when
|
||||
// signals are deferred
|
||||
status_t wait_status;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _SYSTEM_USER_THREAD_DEFS_H */
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _SYSTEM_VFS_DEFS_H
|
||||
#define _SYSTEM_VFS_DEFS_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
struct fd_info {
|
||||
int number;
|
||||
int32 open_mode;
|
||||
dev_t device;
|
||||
ino_t node;
|
||||
};
|
||||
|
||||
#endif /* _SYSTEM_VFS_DEFS_H */
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _SYSTEM_VM_DEFS_H
|
||||
#define _SYSTEM_VM_DEFS_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
|
||||
// additional protection flags
|
||||
// Note: the VM probably won't support all combinations - it will try
|
||||
// its best, but create_area() will fail if it has to.
|
||||
// Of course, the exact behaviour will be documented somewhere...
|
||||
#define B_EXECUTE_AREA 0x04
|
||||
#define B_STACK_AREA 0x08
|
||||
// "stack" protection is not available on most platforms - it's used
|
||||
// to only commit memory as needed, and have guard pages at the
|
||||
// bottom of the stack.
|
||||
// "execute" protection is currently ignored, but nevertheless, you
|
||||
// should use it if you require to execute code in that area.
|
||||
|
||||
#define B_KERNEL_EXECUTE_AREA 0x40
|
||||
#define B_KERNEL_STACK_AREA 0x80
|
||||
|
||||
#define B_USER_PROTECTION \
|
||||
(B_READ_AREA | B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA)
|
||||
#define B_KERNEL_PROTECTION \
|
||||
(B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_KERNEL_EXECUTE_AREA \
|
||||
| B_KERNEL_STACK_AREA)
|
||||
|
||||
// TODO: These aren't really a protection flags, but since the "protection"
|
||||
// field is the only flag field, we currently use it for this.
|
||||
// A cleaner approach would be appreciated - maybe just an official generic
|
||||
// flags region in the protection field.
|
||||
#define B_OVERCOMMITTING_AREA 0x1000
|
||||
#define B_SHARED_AREA 0x2000
|
||||
#define B_KERNEL_AREA 0x4000
|
||||
// Usable from userland according to its protection flags, but the area
|
||||
// itself is not deletable, resizable, etc from userland.
|
||||
|
||||
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
|
||||
#define B_KERNEL_AREA_FLAGS \
|
||||
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA \
|
||||
| B_SHARED_AREA)
|
||||
|
||||
// flags for vm_get_physical_page()
|
||||
enum {
|
||||
PHYSICAL_PAGE_NO_WAIT = 0,
|
||||
PHYSICAL_PAGE_CAN_WAIT,
|
||||
};
|
||||
|
||||
// mapping argument for several internal VM functions
|
||||
enum {
|
||||
REGION_NO_PRIVATE_MAP = 0,
|
||||
REGION_PRIVATE_MAP
|
||||
};
|
||||
|
||||
enum {
|
||||
// ToDo: these are here only temporarily - it's a private
|
||||
// addition to the BeOS create_area() lock flags
|
||||
B_ALREADY_WIRED = 6,
|
||||
};
|
||||
|
||||
#define MEMORY_TYPE_SHIFT 28
|
||||
|
||||
|
||||
#endif /* _SYSTEM_VM_DEFS_H */
|
||||
Reference in New Issue
Block a user