summaryrefslogtreecommitdiff
path: root/src/thread/arm
AgeCommit message (Collapse)AuthorFilesLines
2012-10-15add support for TLS variant I, presently needed for arm and mipsRich Felker1-0/+4
despite documentation that makes it sound a lot different, the only ABI-constraint difference between TLS variants II and I seems to be that variant II stores the initial TLS segment immediately below the thread pointer (i.e. the thread pointer points to the end of it) and variant I stores the initial TLS segment above the thread pointer, requiring the thread descriptor to be stored below. the actual value stored in the thread pointer register also tends to have per-arch random offsets applied to it for silly micro-optimization purposes. with these changes applied, TLS should be basically working on all supported archs except microblaze. I'm still working on getting the necessary information and a working toolchain that can build TLS binaries for microblaze, but in theory, static-linked programs with TLS and dynamic-linked programs where only the main executable uses TLS should already work on microblaze. alignment constraints have not yet been heavily tested, so it's possible that this code does not always align TLS segments correctly on archs that need TLS variant I.
2012-09-27fix arm clone syscall bug (no effect unless app uses clone)Rich Felker1-2/+1
the code to exit the new thread/process after the start function returns was mixed up in its syscall convention.
2012-07-14avoid blx instruction which does not exist on armv4t or armv4Rich Felker1-1/+2
2012-05-23fix bad opcode in arm syscall_cp_asmRich Felker1-1/+1
2012-05-23fix issue with longjmp out of signal handlers and cancellationRich Felker1-10/+8
stale state information indicating that a thread was possibly blocked at a cancellation point could get left behind if longjmp was used to exit a signal handler that interrupted a cancellation point. to fix the issue, we throw away the state information entirely and simply compare the saved instruction pointer to a range of code addresses in the __syscall_cp_asm function. all the ugly PIC work (which becomes minimal anyway with this approach) is defered to cancellation time instead of happening at every syscall, which should improve performance too. this commit also fixes cancellation on arm, which was mildly broken (race condition, not checking cancellation flag once inside the cancellation point zone). apparently i forgot to implement that. the new arm code is untested, but appears correct; i'll test and fix it later if there are problems.
2011-10-09fix typo in arm clone() asmRich Felker1-1/+1
2011-09-18initial commit of the arm portRich Felker4-0/+78
this port assumes eabi calling conventions, eabi linux syscall convention, and presence of the kernel helpers at 0xffff0f?0 needed for threads support. otherwise it makes very few assumptions, and the code should work even on armv4 without thumb support, as well as on systems with thumb interworking. the bits headers declare this a little endian system, but as far as i can tell the code should work equally well on big endian. some small details are probably broken; so far, testing has been limited to qemu/aboriginal linux.