Added prototypes for the sys_/user_ attribute calls.

Changed the file_descriptor structure (more status_t, name removed).
Changed "extern inline" to "static inline" in thread.h/arch_thread.h as those
also work with -O0 -g.
Added prototypes for [arch_cpu_]user_strlcpy().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1454 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2002-10-08 03:19:57 +00:00
parent edef81d01c
commit 11fe0cb8de
6 changed files with 26 additions and 8 deletions
+1
View File
@@ -41,6 +41,7 @@ void arch_cpu_global_TLB_invalidate(void);
int arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr *fault_handler);
int arch_cpu_user_strcpy(char *to, const char *from, addr *fault_handler);
int arch_cpu_user_strncpy(char *to, const char *from, size_t size, addr *fault_handler);
int arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr *fault_handler);
int arch_cpu_user_memset(void *s, char c, size_t count, addr *fault_handler);
void arch_cpu_idle(void);
+2 -2
View File
@@ -15,8 +15,8 @@ void arch_thread_dump_info(void *info);
void arch_thread_enter_uspace(addr entry, void *args, addr ustack_top);
void arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg);
struct thread *arch_thread_get_current_thread(void);
void arch_thread_set_current_thread(struct thread *t);
//struct thread *arch_thread_get_current_thread(void);
//void arch_thread_set_current_thread(struct thread *t);
// for any inline overrides
#include <arch_thread.h>
@@ -16,13 +16,18 @@ void i386_push_iframe(struct thread *t, struct iframe *frame);
void i386_pop_iframe(struct thread *t);
extern inline struct thread *arch_thread_get_current_thread(void) {
static
inline struct thread *
arch_thread_get_current_thread(void)
{
struct thread *t;
read_dr3(t);
return t;
}
extern inline void arch_thread_set_current_thread(struct thread *t) {
static inline void
arch_thread_set_current_thread(struct thread *t)
{
write_dr3(t);
}