diff --git a/headers/private/kernel/arch/thread.h b/headers/private/kernel/arch/thread.h index 8a094a3a12..b9f40a10d3 100644 --- a/headers/private/kernel/arch/thread.h +++ b/headers/private/kernel/arch/thread.h @@ -1,14 +1,17 @@ /* -** Copyright 2002-2004, The Haiku Team. All rights reserved. -** Distributed under the terms of the Haiku License. -** -** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ + * Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. + * 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 KERNEL_ARCH_THREAD_H #define KERNEL_ARCH_THREAD_H + #include +#include + #ifdef __cplusplus extern "C" { diff --git a/headers/private/kernel/fd.h b/headers/private/kernel/fd.h index 77886ccd1d..6950671b03 100644 --- a/headers/private/kernel/fd.h +++ b/headers/private/kernel/fd.h @@ -6,16 +6,16 @@ #define _FD_H +#include #include #include -#include - #ifdef __cplusplus extern "C" { #endif +struct file_descriptor; struct select_sync; struct fd_ops { diff --git a/headers/private/kernel/lock.h b/headers/private/kernel/lock.h index 595a9101f5..7b6594ddb0 100755 --- a/headers/private/kernel/lock.h +++ b/headers/private/kernel/lock.h @@ -1,7 +1,10 @@ -/* -** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ +/* + * Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. + * 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 _KERNEL_LOCK_H #define _KERNEL_LOCK_H @@ -9,22 +12,17 @@ #include #include - typedef struct recursive_lock { sem_id sem; thread_id holder; int recursion; } recursive_lock; -#define ASSERT_LOCKED_RECURSIVE(r) { ASSERT(thread_get_current_thread_id() == (r)->holder); } - typedef struct mutex { sem_id sem; thread_id holder; } mutex; -#define ASSERT_LOCKED_MUTEX(m) { ASSERT(thread_get_current_thread_id() == (m)->holder); } - typedef struct benaphore { sem_id sem; int32 count; @@ -41,6 +39,12 @@ typedef struct rw_lock { #define RW_MAX_READERS 1000000 +#ifdef DEBUG +# include +#endif +#define ASSERT_LOCKED_RECURSIVE(r) { ASSERT(thread_get_current_thread_id() == (r)->holder); } +#define ASSERT_LOCKED_MUTEX(m) { ASSERT(thread_get_current_thread_id() == (m)->holder); } + #ifdef __cplusplus extern "C" { diff --git a/headers/private/kernel/team.h b/headers/private/kernel/team.h index a46c857197..64215139d8 100644 --- a/headers/private/kernel/team.h +++ b/headers/private/kernel/team.h @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2004, Haiku Inc. * Distributed under the terms of the MIT License. */ #ifndef _TEAM_H @@ -14,7 +14,7 @@ extern "C" { #endif -status_t team_init(kernel_args *args); +status_t team_init(struct kernel_args *args); team_id team_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority); status_t wait_for_team(team_id id, status_t *returnCode); diff --git a/headers/private/kernel/thread.h b/headers/private/kernel/thread.h index f8dc9e85b3..9eb8cdef43 100755 --- a/headers/private/kernel/thread.h +++ b/headers/private/kernel/thread.h @@ -74,6 +74,7 @@ status_t _user_get_thread_info(thread_id id, thread_info *info); status_t _user_get_next_thread_info(team_id team, int32 *cookie, thread_info *info); // ToDo: these don't belong here +struct rlimit; int _user_getrlimit(int resource, struct rlimit * rlp); int _user_setrlimit(int resource, const struct rlimit * rlp); diff --git a/headers/private/kernel/thread_types.h b/headers/private/kernel/thread_types.h index 1aa8d04b5d..09798ebd65 100644 --- a/headers/private/kernel/thread_types.h +++ b/headers/private/kernel/thread_types.h @@ -1,4 +1,5 @@ -/* Copyright 2004, Haiku Inc. +/* + * Copyright 2004, Haiku Inc. * Distributed under the terms of the MIT License. * * Thread definition and structures @@ -8,7 +9,6 @@ #include -#include #include #include #include