path: root/src/thread/mips/clone.s
AgeCommit message (Collapse)AuthorLines
2018-09-12make arch __clone backends hiddenRich Felker-0/+1
these are not a public interface and are not intended to be callable from anywhere but the public clone function or other places in libc.
2018-08-18mips archs: fix runaway execution if start fn passed to clone returnsSegev Finer-1/+4
Call SYS_exit on return from fn in __clone. This is the expected behavior of this function. Without this the child task will crash on return from fn, since it will return to nowhere.
2013-09-16fix clobbering of caller's stack in mips __clone functionRich Felker-0/+3
this was resulting in crashes in posix_spawn on mips, and would have affected applications calling clone too. since the prototype for __clone has it as a variadic function, it may not assume that 16($sp) is writable for use in making the syscall. instead, it needs to allocate additional stack space, and then adjust the stack pointer back in both of the code paths for the parent process/thread.
2013-09-14fix child stack alignment on mips cloneRich Felker-0/+1
unlike other archs, the mips version of clone was not doing anything to align the stack pointer. this seems to have been the cause for some SIGBUS crashes that were observed in posix_spawn.
2012-07-11mips clone: don't free stack space used to copy argRich Felker-1/+0
the mips abi reserves stack space equal to the size of the in-register args for the callee to save the args, if desired. this would cause the beginning of the thread structure to be clobbered...
2012-07-11fix mips clone() on real linux kernelRich Felker-4/+7
the old code worked in qemu app-level emulation, but not on real kernels where the clone syscall does not copy the register values to the new thread. save arguments on the new thread stack instead.
2012-07-11fix clone() on mips (args were in wrong order)Rich Felker-3/+2
with this change, threads on mips seem to be working
2012-07-11first attempt at making threads work on mipsRich Felker-0/+27