Removed unused <arch>_switch_stack_and_call() and
arch_thread_switch_kstack_and_call(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34971 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,7 +16,6 @@ void sh4_set_kstack(addr kstack);
|
|||||||
void sh4_enter_uspace(addr entry, void *args, addr ustack_top);
|
void sh4_enter_uspace(addr entry, void *args, addr ustack_top);
|
||||||
void sh4_set_user_pgdir(addr pgdir);
|
void sh4_set_user_pgdir(addr pgdir);
|
||||||
void sh4_invl_page(addr va);
|
void sh4_invl_page(addr va);
|
||||||
void sh4_switch_stack_and_call(addr stack, void (*func)(void *), void *arg);
|
|
||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
|
|
||||||
#define _BIG_ENDIAN 0
|
#define _BIG_ENDIAN 0
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ status_t arch_thread_init_kthread_stack(struct thread *t,
|
|||||||
void arch_thread_dump_info(void *info);
|
void arch_thread_dump_info(void *info);
|
||||||
status_t arch_thread_enter_userspace(struct thread *t, addr_t entry,
|
status_t arch_thread_enter_userspace(struct thread *t, addr_t entry,
|
||||||
void *args1, void *args2);
|
void *args1, void *args2);
|
||||||
void arch_thread_switch_kstack_and_call(struct thread *t, addr_t new_kstack,
|
|
||||||
void (*func)(void *), void *arg);
|
|
||||||
|
|
||||||
bool arch_on_signal_stack(struct thread *thread);
|
bool arch_on_signal_stack(struct thread *thread);
|
||||||
status_t arch_setup_signal_frame(struct thread *t, struct sigaction *sa,
|
status_t arch_setup_signal_frame(struct thread *t, struct sigaction *sa,
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ void x86_userspace_thread_exit(void);
|
|||||||
void x86_end_userspace_thread_exit(void);
|
void x86_end_userspace_thread_exit(void);
|
||||||
void x86_enter_userspace(addr_t entry, addr_t stackTop);
|
void x86_enter_userspace(addr_t entry, addr_t stackTop);
|
||||||
void i386_set_tss_and_kstack(addr_t kstack);
|
void i386_set_tss_and_kstack(addr_t kstack);
|
||||||
void i386_switch_stack_and_call(addr_t stack, void (*func)(void*), void* arg);
|
|
||||||
void i386_swap_pgdir(addr_t newPageDir);
|
void i386_swap_pgdir(addr_t newPageDir);
|
||||||
void i386_fnsave(void* fpuState);
|
void i386_fnsave(void* fpuState);
|
||||||
void i386_fxsave(void* fpuState);
|
void i386_fxsave(void* fpuState);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2007, Haiku Inc. All rights reserved.
|
* Copyright 2003-2010, Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <arch_thread.h>
|
#include <arch_thread.h>
|
||||||
|
|
||||||
#include <arch_cpu.h>
|
#include <arch_cpu.h>
|
||||||
@@ -113,15 +114,6 @@ arch_thread_init_tls(struct thread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t newKstack,
|
|
||||||
void (*func)(void *), void *arg)
|
|
||||||
{
|
|
||||||
#warning ARM:WRITEME
|
|
||||||
// m68k_switch_stack_and_call(newKstack, func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
|
||||||
*
|
|
||||||
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <arch/m68k/arch_cpu.h>
|
#include <arch/m68k/arch_cpu.h>
|
||||||
|
|
||||||
#include <asm_defs.h>
|
#include <asm_defs.h>
|
||||||
@@ -107,21 +105,6 @@ FUNCTION(m68k_context_switch):
|
|||||||
FUNCTION_END(m68k_context_switch)
|
FUNCTION_END(m68k_context_switch)
|
||||||
|
|
||||||
|
|
||||||
// void m68k_switch_stack_and_call(addr_t newKstack,
|
|
||||||
// void (*func)(void *), void *arg)
|
|
||||||
FUNCTION(m68k_switch_stack_and_call):
|
|
||||||
#warning M68K: check
|
|
||||||
move.l 4(%sp),%a0 // new stack
|
|
||||||
move.l 8(%sp),%a1 // func
|
|
||||||
move.l 12(%sp),%d0 // args
|
|
||||||
move.l %a0,%sp // switch the stack
|
|
||||||
move.l %d0,-(%sp) // push the argument
|
|
||||||
jsr (%a1) // call the target function
|
|
||||||
_loop:
|
|
||||||
bra _loop
|
|
||||||
FUNCTION_END(m68k_switch_stack_and_call)
|
|
||||||
|
|
||||||
|
|
||||||
// m68k_kernel_thread_root(): parameters in r13-r15, the functions to call
|
// m68k_kernel_thread_root(): parameters in r13-r15, the functions to call
|
||||||
// (in that order). The function is used when spawing threads. It usually calls
|
// (in that order). The function is used when spawing threads. It usually calls
|
||||||
// an initialization function, the actual thread function, and a function that
|
// an initialization function, the actual thread function, and a function that
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2007, Haiku Inc. All rights reserved.
|
* Copyright 2003-2010, Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <arch_thread.h>
|
#include <arch_thread.h>
|
||||||
|
|
||||||
#include <arch_cpu.h>
|
#include <arch_cpu.h>
|
||||||
@@ -35,9 +36,6 @@ struct thread *gCurrentThread;
|
|||||||
// Helper function for thread creation, defined in arch_asm.S.
|
// Helper function for thread creation, defined in arch_asm.S.
|
||||||
extern "C" void m68k_kernel_thread_root();
|
extern "C" void m68k_kernel_thread_root();
|
||||||
|
|
||||||
extern "C" void m68k_switch_stack_and_call(addr_t newKstack,
|
|
||||||
void (*func)(void *), void *arg);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
m68k_push_iframe(struct iframe_stack *stack, struct iframe *frame)
|
m68k_push_iframe(struct iframe_stack *stack, struct iframe *frame)
|
||||||
@@ -199,14 +197,6 @@ arch_thread_init_tls(struct thread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t newKstack,
|
|
||||||
void (*func)(void *), void *arg)
|
|
||||||
{
|
|
||||||
m68k_switch_stack_and_call(newKstack, func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2009 Haiku Inc. All rights reserved.
|
* Copyright 2003-2010 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -103,14 +103,6 @@ arch_thread_init_tls(struct thread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t newKstack,
|
|
||||||
void (*func)(void *), void *arg)
|
|
||||||
{
|
|
||||||
#warning IMPLEMENT arch_thread_switch_kstack_and_call
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
* Copyright 2006-2010, Ingo Weinhold <ingo_weinhold@gmx.de>.
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define FUNCTION(x) .global x; .type x,@function; x
|
#define FUNCTION(x) .global x; .type x,@function; x
|
||||||
|
|
||||||
#define MSR_EXCEPTIONS_ENABLED 15
|
#define MSR_EXCEPTIONS_ENABLED 15
|
||||||
@@ -312,15 +313,6 @@ FUNCTION(ppc_context_switch):
|
|||||||
blr
|
blr
|
||||||
|
|
||||||
|
|
||||||
// void ppc_switch_stack_and_call(addr_t newKstack,
|
|
||||||
// void (*func)(void *), void *arg)
|
|
||||||
FUNCTION(ppc_switch_stack_and_call):
|
|
||||||
mr %r1, %r3 // set the new stack pointer
|
|
||||||
mtctr %r4 // move the target function into CTR
|
|
||||||
mr %r3, %r5 // move the arg to this func to the new arg
|
|
||||||
bctr
|
|
||||||
|
|
||||||
|
|
||||||
// ppc_kernel_thread_root(): parameters in r13-r15, the functions to call
|
// ppc_kernel_thread_root(): parameters in r13-r15, the functions to call
|
||||||
// (in that order). The function is used when spawing threads. It usually calls
|
// (in that order). The function is used when spawing threads. It usually calls
|
||||||
// an initialization function, the actual thread function, and a function that
|
// an initialization function, the actual thread function, and a function that
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2007, Haiku Inc. All rights reserved.
|
* Copyright 2003-2010, Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <arch_thread.h>
|
#include <arch_thread.h>
|
||||||
|
|
||||||
#include <arch_cpu.h>
|
#include <arch_cpu.h>
|
||||||
@@ -30,9 +31,6 @@ static struct arch_thread sInitialState;
|
|||||||
// Helper function for thread creation, defined in arch_asm.S.
|
// Helper function for thread creation, defined in arch_asm.S.
|
||||||
extern "C" void ppc_kernel_thread_root();
|
extern "C" void ppc_kernel_thread_root();
|
||||||
|
|
||||||
extern "C" void ppc_switch_stack_and_call(addr_t newKstack, void (*func)(void *),
|
|
||||||
void *arg);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ppc_push_iframe(struct iframe_stack *stack, struct iframe *frame)
|
ppc_push_iframe(struct iframe_stack *stack, struct iframe *frame)
|
||||||
@@ -169,14 +167,6 @@ arch_thread_init_tls(struct thread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t newKstack,
|
|
||||||
void (*func)(void *), void *arg)
|
|
||||||
{
|
|
||||||
ppc_switch_stack_and_call(newKstack, func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_thread_context_switch(struct thread *t_from, struct thread *t_to)
|
arch_thread_context_switch(struct thread *t_from, struct thread *t_to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <arch/thread.h>
|
#include <arch/thread.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -351,14 +352,6 @@ arch_thread_init_tls(struct thread *thread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t new_kstack,
|
|
||||||
void (*func)(void *), void *arg)
|
|
||||||
{
|
|
||||||
i386_switch_stack_and_call(new_kstack, func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <asm_defs.h>
|
#include <asm_defs.h>
|
||||||
|
|
||||||
#include <arch/x86/descriptors.h>
|
#include <arch/x86/descriptors.h>
|
||||||
@@ -180,18 +181,6 @@ FUNCTION(x86_enter_userspace):
|
|||||||
iret
|
iret
|
||||||
FUNCTION_END(x86_enter_userspace)
|
FUNCTION_END(x86_enter_userspace)
|
||||||
|
|
||||||
/* void i386_switch_stack_and_call(addr stack, void (*func)(void *), void *arg); */
|
|
||||||
FUNCTION(i386_switch_stack_and_call):
|
|
||||||
movl 4(%esp),%eax // new stack
|
|
||||||
movl 8(%esp),%ecx // func
|
|
||||||
movl 12(%esp),%edx // args
|
|
||||||
|
|
||||||
movl %eax,%esp // switch the stack
|
|
||||||
pushl %edx // push the argument
|
|
||||||
call *%ecx // call the target function
|
|
||||||
_loop:
|
|
||||||
jmp _loop
|
|
||||||
FUNCTION_END(i386_switch_stack_and_call)
|
|
||||||
|
|
||||||
null_idt_descr:
|
null_idt_descr:
|
||||||
.word 0
|
.word 0
|
||||||
|
|||||||
Reference in New Issue
Block a user