Some header work to reduce dependencies. Also fixes the debug build.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10434 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-12-13 22:22:45 +00:00
parent 5c143f85ad
commit 97dda329ed
6 changed files with 29 additions and 21 deletions
+9 -6
View File
@@ -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, [email protected].
* 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 <thread.h>
#include <thread_types.h>
#ifdef __cplusplus
extern "C" {
+2 -2
View File
@@ -6,16 +6,16 @@
#define _FD_H
#include <vfs.h>
#include <team.h>
#include <thread.h>
#include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
struct file_descriptor;
struct select_sync;
struct fd_ops {
+13 -9
View File
@@ -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, [email protected].
* 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 <OS.h>
#include <debug.h>
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 <thread.h>
#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" {
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2004, Axel Dörfler, [email protected].
* 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);
+1
View File
@@ -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);
+2 -2
View File
@@ -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 <cbuf.h>
#include <vm.h>
#include <smp.h>
#include <signal.h>
#include <timer.h>