Moved <types.h> to <sys/types.h>.

Removed dependencies on arch/x86/types.h - this file is not really used
anymore, now. Might prevent compiling on Windows, though.
Replaced "int" with "int32" for the id types.
Removed some stuff from ktypes.h because it didn't belong there.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1120 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2002-09-23 02:36:51 +00:00
parent 8edc4bb4c8
commit 4e3c12c0af
9 changed files with 37 additions and 78 deletions
@@ -5,8 +5,6 @@
#ifndef _KERNEL_ARCH_x86_SELECTOR_H
#define _KERNEL_ARCH_x86_SELECTOR_H
#include <arch/x86/types.h>
typedef uint32 selector_id;
typedef uint64 selector_type;
+2 -2
View File
@@ -13,8 +13,8 @@
typedef __int64 int64;
#endif
typedef unsigned int uint32;
typedef int int32;
typedef unsigned long uint32;
typedef long int32;
typedef unsigned short uint16;
typedef short int16;
typedef unsigned char uint8;
-1
View File
@@ -2,7 +2,6 @@
#define _KERNEL_ATOMIC_H
#include <ktypes.h>
typedef volatile int vint32; //XXX misplaced here
/**
* @file kernel/atomic.h
+1 -1
View File
@@ -5,7 +5,7 @@
#ifndef _ELF32_H
#define _ELF32_H
#include <types.h>
#include <ktypes.h>
typedef uint32 Elf32_Addr;
typedef uint16 Elf32_Half;
+2 -2
View File
@@ -44,8 +44,8 @@ extern "C" {
#define ROUNDUP(a, b) (((a) + ((b)-1)) & ~((b)-1))
#define ROUNDOWN(a, b) (((a) / (b)) * (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
//#define min(a, b) ((a) < (b) ? (a) : (b))
//#define max(a, b) ((a) > (b) ? (a) : (b))
/** return the offset of member 'm' within type 't' */
#define offsetof(t, m) ((size_t)&(((t *)0)->m))
+15
View File
@@ -0,0 +1,15 @@
/*
** Copyright 2001-2002, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _KERNEL_MODULE_H
#define _KERNEL_MODULE_H
#include <drivers/module.h>
#include <kernel.h>
#include <stage2.h>
extern status_t module_init(kernel_args *ka, module_info **sys_module_headers);
#endif /* _KRENEL_MODULE_H */
+1 -1
View File
@@ -3,7 +3,7 @@
** Distributed under the terms of the NewOS License.
*/
#include <types.h>
#include <sys/types.h>
#ifndef _KERNEL_SYSCALLS_H
#define _KERNEL_SYSCALLS_H
+16 -29
View File
@@ -9,17 +9,18 @@
extern "C" {
#endif
#include <types.h>
//#include <types.h>
#include <SupportDefs.h>
typedef uint16 mode_t;
typedef int pid_t;
typedef int thread_id;
typedef int region_id;
typedef int aspace_id;
typedef int team_id;
typedef int sem_id;
typedef int port_id;
typedef int image_id;
typedef int32 thread_id;
typedef int32 region_id;
typedef int32 aspace_id;
typedef int32 team_id;
typedef int32 sem_id;
typedef int32 port_id;
typedef int32 image_id;
typedef uint32 dev_t;
typedef uint64 ino_t;
typedef uint64 vnode_id;
@@ -27,29 +28,13 @@ typedef uint32 fs_id;
typedef uint16 nlink_t;
typedef uint32 uid_t;
typedef uint32 gid_t;
typedef int32 status_t;
//typedef int32 status_t;
#ifdef _OBOS_TIME_T_
typedef _OBOS_TIME_T_ time_t;
#undef _OBOS_TIME_T_
#endif /* _OBOS_TIME_T_ */
typedef int64 bigtime_t;
#ifndef NULL
#define NULL 0
#endif
#ifndef __cplusplus
#define false 0
#define true 1
typedef int bool;
#endif
/*
* XXX serious hack that doesn't really solve the problem.
* As of right now, some versions of the toolchain expect size_t to
@@ -72,10 +57,12 @@ typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
//typedef unsigned char uchar;
//typedef unsigned short ushort;
//typedef unsigned int uint;
//typedef unsigned long ulong;
typedef unsigned long addr;
// Handled in arch_ktypes.h
-40
View File
@@ -1,40 +0,0 @@
/*
** Copyright 2001-2002, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _KERNEL_MODULE_H
#define _KERNEL_MODULE_H
#include <kernel.h>
#include <stage2.h>
typedef struct module_info module_info;
struct module_info {
const char *name;
uint32 flags;
int32 (*std_ops)(int32, ...);
};
// boot init
// XXX this is very private, so move it away
extern int module_init( kernel_args *ka, module_info **sys_module_headers );
/* Be Module Compatability... */
#define B_MODULE_INIT 1
#define B_MODULE_UNINIT 2
#define B_KEEP_LOADED 0x00000001
int get_module(const char *path, module_info **vec);
int put_module(const char *path);
int get_next_loaded_module_name(uint32 *cookie, char *buf, size_t *bufsize);
void *open_module_list(const char *prefix);
int read_next_module_name(void *cookie, char *buf, size_t *bufsize);
int close_module_list(void *cookie);
extern module_info *modules[];
#endif /* _|KRENEL_MODULE_H */