Skip to content
Snippets Groups Projects
Commit ad385e28 authored by John Hodge's avatar John Hodge
Browse files

Kernel/armv7 - Fixed worker thread creation

parent 8561b715
No related merge requests found
...@@ -18,16 +18,8 @@ KernelThreadHeader: ...@@ -18,16 +18,8 @@ KernelThreadHeader:
@ TODO: Do something with the thread pointer @ TODO: Do something with the thread pointer
ldr r4, [sp],#4 @ Function ldr r4, [sp],#4 @ Function
ldr r5, [sp],#4 @ Get argument
@ Get arguments ldr r0, [sp],#4
sub r5, #1
ldrhs r0, [sp],#4
@ suble r5, #1
@ ldrhs r1, [sp],#4
@ suble r5, #1
@ ldrhs r2, [sp],#4
@ suble r5, #1
@ ldrhs r3, [sp],#4
blx r4 blx r4
...@@ -87,17 +79,16 @@ Proc_CloneInt: ...@@ -87,17 +79,16 @@ Proc_CloneInt:
ldr r0, =Proc_CloneInt_new ldr r0, =Proc_CloneInt_new
pop {r4-r12,pc} pop {r4-r12,pc}
Proc_CloneInt_new: Proc_CloneInt_new:
cps #18 @ cps #18
@ mov r0, #0 @ mov r0, #0
@ mov r1, #0 @ mvn r1, #0
@ sub r1, #1
@ bl MM_DumpTables @ bl MM_DumpTables
@ ldr r0, =csProc_CloneInt_NewTaskMessage ldr r0, =csProc_CloneInt_NewTaskMessage
@ bl Log bl Log
cps #19 @ cps #19
mov r0, #0 mov r0, #0
pop {r4-r12,pc} pop {r4-r12,pc}
......
...@@ -140,7 +140,6 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr ) ...@@ -140,7 +140,6 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr )
sp = new->KernelStack; sp = new->KernelStack;
*(Uint32*)(sp -= 4) = (Uint)Ptr; *(Uint32*)(sp -= 4) = (Uint)Ptr;
*(Uint32*)(sp -= 4) = 1;
*(Uint32*)(sp -= 4) = (Uint)Fnc; *(Uint32*)(sp -= 4) = (Uint)Fnc;
*(Uint32*)(sp -= 4) = (Uint)new; *(Uint32*)(sp -= 4) = (Uint)new;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment