summaryrefslogtreecommitdiff
path: root/src/thread/mips
AgeCommit message (Collapse)AuthorLines
2015-06-20work around mips detached thread exit breakage due to kernel regressionRich Felker-0/+1
linux kernel commit 46e12c07b3b9603c60fc1d421ff18618241cb081 caused the mips syscall mechanism to fail with EFAULT when the userspace stack pointer is invalid, breaking __unmapself used for detached thread exit. the workaround is to set $sp to a known-valid, readable address, and the simplest one to obtain is the address of the current function, which is available (per o32 calling convention) in $25.
2015-05-25mark mips cancellable syscall code as codeRich Felker-0/+3
otherwise disassemblers treat it as data.
2015-04-14consistently use hidden visibility for cancellable syscall internalsRich Felker-3/+8
in a few places, non-hidden symbols were referenced from asm in ways that assumed ld-time binding. while these is no semantic reason these symbols need to be hidden, fixing the references without making them hidden was going to be ugly, and hidden reduces some bloat anyway. in the asm files, .global/.hidden directives have been moved to the top to unclutter the actual code.
2015-02-20prepare cancellation syscall asm for possibility of __cancel returningRich Felker-8/+12
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-09-15update mips cancellation-point syscall asm with 7-arg and r25 fixesRich Felker-2/+5
these fixes were already made to the normal syscall asm but not the cancellation point version.
2012-09-09fix mips syscall_cp_asm code (saved register usage)Rich Felker-2/+2
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/+67