mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 07:20:11 +00:00
Likewise tuck the thread data onto the new thread's stack.
This commit is contained in:
parent
c0fda13c38
commit
0f85544d18
@ -42,9 +42,12 @@ ENTRY(__clone)
|
|||||||
beq a0,$error /* no NULL function pointers */
|
beq a0,$error /* no NULL function pointers */
|
||||||
beq a1,$error /* no NULL stack pointers */
|
beq a1,$error /* no NULL stack pointers */
|
||||||
|
|
||||||
|
/* Save the fn ptr and arg on the new stack. */
|
||||||
|
subq a1,16,a1
|
||||||
|
stq a0,0(a1)
|
||||||
|
stq a3,8(a1)
|
||||||
|
|
||||||
/* Do the system call */
|
/* Do the system call */
|
||||||
mov a0,pv /* get fn ptr out of the way */
|
|
||||||
mov a3,t0 /* get fn arg out of the way */
|
|
||||||
mov a2,a0
|
mov a2,a0
|
||||||
ldiq v0,__NR_clone
|
ldiq v0,__NR_clone
|
||||||
call_pal PAL_callsys
|
call_pal PAL_callsys
|
||||||
@ -73,8 +76,12 @@ thread_start:
|
|||||||
mov zero,fp
|
mov zero,fp
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
|
/* Load up the arguments. */
|
||||||
|
ldq pv,0(sp)
|
||||||
|
ldq a0,8(sp)
|
||||||
|
addq sp,16,sp
|
||||||
|
|
||||||
/* Call the user's function */
|
/* Call the user's function */
|
||||||
mov t0,a0
|
|
||||||
jsr ra,(pv)
|
jsr ra,(pv)
|
||||||
ldgp gp,0(ra)
|
ldgp gp,0(ra)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user