]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
use core for cpu-specific bits of thread creation
authorAntti Kantee <pooka@iki.fi>
Mon, 20 Apr 2015 20:50:29 +0000 (20:50 +0000)
committerAntti Kantee <pooka@iki.fi>
Mon, 20 Apr 2015 20:50:29 +0000 (20:50 +0000)
platform/xen/xen/arch/x86/sched.c
platform/xen/xen/include/mini-os/sched.h
platform/xen/xen/sched.c

index e1a1afc10971447dc5add6f04dbdaec8e0e3b975..c9c672486c767533248d3071da3a0741fc389d64 100644 (file)
@@ -78,28 +78,6 @@ void dump_stack(struct thread *thread_md)
    defined in x86_[32/64].S */
 extern void _minios_entry_thread_starter(void);
 
-/* Pushes the specified value onto the stack of the specified thread */
-static void stack_push(struct bmk_tcb *tcb, unsigned long value)
-{
-    tcb->btcb_sp -= sizeof(unsigned long);
-    *((unsigned long *)tcb->btcb_sp) = value;
-}
-
-/* Architecture specific setup of thread creation */
-void arch_create_thread(void *thread, struct bmk_tcb *tcb,
-       void (*function)(void *), void *data,
-       void *stack, unsigned long stack_size)
-{
-    
-    tcb->btcb_sp = (unsigned long)stack + stack_size;
-    /* Save pointer to the thread on the stack, used by current macro */
-    *((unsigned long *)stack) = (unsigned long)thread;
-    
-    stack_push(tcb, (unsigned long) function);
-    stack_push(tcb, (unsigned long) data);
-    tcb->btcb_ip = (unsigned long) bmk_cpu_sched_bouncer;
-}
-
 void run_idle_thread(void)
 {
     /* Switch stacks and run the thread */ 
index 529de2055fbe801d36df10a9786802fbeb0078c1..773b258a1b9603a9f18182494e71a6befda3e7fb 100644 (file)
@@ -12,8 +12,4 @@ void idle_thread_fn(void *unused);
 
 void run_idle_thread(void);
 
-void arch_create_thread(void *thread, struct bmk_tcb *,
-                       void (*function)(void *), void *data,
-                       void *stack_base, unsigned long stack_size);
-
 #endif /* __MINIOS_SCHED_H__ */
index e19e0cf9054d82bc231dc758af97a633fffacdc3..007a116ccecb4277b03cd0fa2f558e96c77ac596 100644 (file)
@@ -317,7 +317,7 @@ bmk_sched_create(const char *name, void *cookie, int joinable,
        if (joinable)
                thread->bt_flags |= THREAD_MUSTJOIN;
 
-       arch_create_thread(thread, &thread->bt_tcb, f, data,
+       bmk_cpu_sched_create(thread, &thread->bt_tcb, f, data,
            stack_base, stack_size);
 
        thread->bt_cookie = cookie;