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:
parent
29aa1bebef
commit
924a3e5f9b
@ -16,7 +16,6 @@ void sh4_set_kstack(addr kstack);
|
||||
void sh4_enter_uspace(addr entry, void *args, addr ustack_top);
|
||||
void sh4_set_user_pgdir(addr pgdir);
|
||||
void sh4_invl_page(addr va);
|
||||
void sh4_switch_stack_and_call(addr stack, void (*func)(void *), void *arg);
|
||||
#define PAGE_SIZE 4096
|
||||
|
||||
#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);
|
||||
status_t arch_thread_enter_userspace(struct thread *t, addr_t entry,
|
||||
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);
|
||||
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_enter_userspace(addr_t entry, addr_t stackTop);
|
||||
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_fnsave(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.
|
||||
*
|
||||
* Authors:
|
||||
@ -11,6 +11,7 @@
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch_thread.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
|
||||
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.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch/m68k/arch_cpu.h>
|
||||
|
||||
#include <asm_defs.h>
|
||||
@ -26,7 +24,7 @@ FUNCTION(arch_int_enable_interrupts):
|
||||
FUNCTION_END(arch_int_enable_interrupts)
|
||||
|
||||
|
||||
/* int arch_int_disable_interrupts(void)
|
||||
/* int arch_int_disable_interrupts(void)
|
||||
*/
|
||||
FUNCTION(arch_int_disable_interrupts):
|
||||
clr.l %d0
|
||||
@ -41,7 +39,7 @@ FUNCTION(arch_int_disable_interrupts):
|
||||
FUNCTION_END(arch_int_disable_interrupts)
|
||||
|
||||
|
||||
/* void arch_int_restore_interrupts(int oldState)
|
||||
/* void arch_int_restore_interrupts(int oldState)
|
||||
*/
|
||||
FUNCTION(arch_int_restore_interrupts):
|
||||
move.l (4,%a7),%d0
|
||||
@ -97,7 +95,7 @@ FUNCTION(m68k_context_switch):
|
||||
#warning M68K: use fixed size for fsave
|
||||
|
||||
// XXX
|
||||
|
||||
|
||||
frestore (%sp)+
|
||||
fmovem (%sp)+,%fp0-%fp7
|
||||
movem.l (%sp)+,%d0-%d7/%a0-%a7
|
||||
@ -107,21 +105,6 @@ FUNCTION(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
|
||||
// (in that order). The function is used when spawing threads. It usually calls
|
||||
// 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.
|
||||
*
|
||||
* Authors:
|
||||
@ -11,6 +11,7 @@
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch_thread.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
@ -35,9 +36,6 @@ struct thread *gCurrentThread;
|
||||
// Helper function for thread creation, defined in arch_asm.S.
|
||||
extern "C" void m68k_kernel_thread_root();
|
||||
|
||||
extern "C" void m68k_switch_stack_and_call(addr_t newKstack,
|
||||
void (*func)(void *), void *arg);
|
||||
|
||||
|
||||
void
|
||||
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
|
||||
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.
|
||||
*
|
||||
* 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
|
||||
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.
|
||||
*
|
||||
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#define MSR_EXCEPTIONS_ENABLED 15
|
||||
@ -30,7 +31,7 @@ FUNCTION(arch_int_enable_interrupts):
|
||||
blr
|
||||
|
||||
|
||||
/* int arch_int_disable_interrupts(void)
|
||||
/* int arch_int_disable_interrupts(void)
|
||||
* r3
|
||||
*/
|
||||
FUNCTION(arch_int_disable_interrupts):
|
||||
@ -45,7 +46,7 @@ FUNCTION(arch_int_disable_interrupts):
|
||||
blr
|
||||
|
||||
|
||||
/* void arch_int_restore_interrupts(int oldState)
|
||||
/* void arch_int_restore_interrupts(int oldState)
|
||||
* r3
|
||||
*/
|
||||
FUNCTION(arch_int_restore_interrupts):
|
||||
@ -61,7 +62,7 @@ FUNCTION(arch_int_restore_interrupts):
|
||||
/* bool arch_int_are_interrupts_enabled(void) */
|
||||
FUNCTION(arch_int_are_interrupts_enabled):
|
||||
mfmsr %r3 // load msr
|
||||
extrwi %r3, %r3, 1, 31 - MSR_EXCEPTIONS_ENABLED
|
||||
extrwi %r3, %r3, 1, 31 - MSR_EXCEPTIONS_ENABLED
|
||||
// mask out the EE bit
|
||||
blr
|
||||
|
||||
@ -195,7 +196,7 @@ FUNCTION(setl2cr):
|
||||
isync
|
||||
blr
|
||||
|
||||
|
||||
|
||||
// void ppc_context_switch(addr_t *old_sp, addr_t new_sp);
|
||||
FUNCTION(ppc_context_switch):
|
||||
|
||||
@ -306,21 +307,12 @@ FUNCTION(ppc_context_switch):
|
||||
lfdu %f29, 8(%r1)
|
||||
lfdu %f30, 8(%r1)
|
||||
lfdu %f31, 8(%r1)
|
||||
|
||||
|
||||
addi %r1, %r1, 8
|
||||
|
||||
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
|
||||
// (in that order). The function is used when spawing threads. It usually calls
|
||||
// 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.
|
||||
*
|
||||
* Authors:
|
||||
@ -10,6 +10,7 @@
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch_thread.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
@ -30,9 +31,6 @@ static struct arch_thread sInitialState;
|
||||
// Helper function for thread creation, defined in arch_asm.S.
|
||||
extern "C" void ppc_kernel_thread_root();
|
||||
|
||||
extern "C" void ppc_switch_stack_and_call(addr_t newKstack, void (*func)(void *),
|
||||
void *arg);
|
||||
|
||||
|
||||
void
|
||||
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
|
||||
arch_thread_context_switch(struct thread *t_from, struct thread *t_to)
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch/thread.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
|
||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||
{
|
||||
|
@ -7,6 +7,7 @@
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
#include <arch/x86/descriptors.h>
|
||||
@ -180,18 +181,6 @@ FUNCTION(x86_enter_userspace):
|
||||
iret
|
||||
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:
|
||||
.word 0
|
||||
|
Loading…
Reference in New Issue
Block a user