Removed some type definitions from ktypes.h that are now located in OS.h.

Changed lock.h to like those changes.
Moved the create_sem_etc() from the public OS.h to the private kernel only
sem.h, cleaned it up a bit.
gcc doesn't seem to like the "extern inlines" with -O0 -g, so I replaced
an inline function in thread.h with "static inline" (which it does always
like).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1376 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-10-05 01:17:28 +00:00
parent 1522bbc771
commit e96a844909
4 changed files with 15 additions and 16 deletions

View File

@ -13,12 +13,8 @@ extern "C" {
typedef uint16 mode_t;
typedef int pid_t;
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;

View File

@ -5,6 +5,7 @@
#ifndef _KERNEL_LOCK_H
#define _KERNEL_LOCK_H
#include <OS.h>
#include <kernel.h>
#include <debug.h>

View File

@ -13,8 +13,7 @@
#include <thread.h>
#include <stage2.h>
/* #ifdef _KERNEL_ */
/* user calls */
sem_id user_create_sem(int32 count, const char *name);
status_t user_delete_sem(sem_id id);
status_t user_delete_sem_etc(sem_id id, status_t return_code);
@ -27,11 +26,10 @@ status_t user_get_sem_info(sem_id, struct sem_info *, size_t);
status_t user_get_next_sem_info(team_id, int32 *, struct sem_info *, size_t);
status_t user_set_sem_owner(sem_id id, team_id team);
/* kernel calls */
extern sem_id create_sem_etc(int32 count, const char *name, team_id owner);
extern status_t sem_init(kernel_args *ka);
extern int sem_delete_owned_sems(team_id owner);
extern status_t sem_interrupt_thread(struct thread *t);
status_t sem_init(kernel_args *ka);
int sem_delete_owned_sems(team_id owner);
status_t sem_interrupt_thread(struct thread *t);
/* #endif */
#endif /* _KERNEL_SEM_H */
#endif /* _KERNEL_SEM_H */

View File

@ -51,11 +51,15 @@ struct thread *thread_get_thread_struct(thread_id id);
#ifdef NEW_SCHEDULER
struct thread *thread_get_thread_struct_locked(thread_id id);
#endif /* NEW_SCHEDULER */
thread_id thread_get_current_thread_id(void);
extern inline thread_id thread_get_current_thread_id(void) {
struct thread *t = thread_get_current_thread(); return t ? t->id : 0;
static thread_id thread_get_current_thread_id(void);
static inline thread_id
thread_get_current_thread_id(void)
{
struct thread *t = thread_get_current_thread();
return t ? t->id : 0;
}
int thread_wait_on_thread(thread_id id, int *retcode);
thread_id thread_create_user_thread(char *name, team_id tid, addr entry, void *args);