about summary refs log tree commit diff
path: root/src/thread/arm
Commit message (Collapse)AuthorAgeFilesLines
* add support for TLS variant I, presently needed for arm and mipsRich Felker2012-10-151-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.
* fix arm clone syscall bug (no effect unless app uses clone)Rich Felker2012-09-271-2/+1
| | | | | the code to exit the new thread/process after the start function returns was mixed up in its syscall convention.
* avoid blx instruction which does not exist on armv4t or armv4Rich Felker2012-07-141-1/+2
|
* fix bad opcode in arm syscall_cp_asmRich Felker2012-05-231-1/+1
|
* fix issue with longjmp out of signal handlers and cancellationRich Felker2012-05-231-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.
* fix typo in arm clone() asmRich Felker2011-10-091-1/+1
|
* initial commit of the arm portRich Felker2011-09-184-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.