summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-06-10 02:27:40 +0000
committerRich Felker <dalias@aerifal.cx>2015-06-10 02:27:40 +0000
commitc30cbcb0a646b1f13a22c645616dce624465b883 (patch)
treef4bf3126b42b95645888d569ad97d24e20990280 /src/stdio
parent276904c2f6bde3a31a24ebfa201482601d18b4f9 (diff)
downloadmusl-c30cbcb0a646b1f13a22c645616dce624465b883.tar.gz
musl-c30cbcb0a646b1f13a22c645616dce624465b883.tar.bz2
musl-c30cbcb0a646b1f13a22c645616dce624465b883.tar.xz
musl-c30cbcb0a646b1f13a22c645616dce624465b883.zip
implement arch-generic version of __unmapself
this can be used to put off writing an asm version of __unmapself for new archs, or as a permanent solution on archs where it's not practical or even possible to run momentarily with no stack. the concept here is simple: the caller takes a lock on a global shared stack and uses it to make the munmap and exit syscalls. the only trick is unlocking, which must be done after the thread exits, and this is achieved by using the set_tid_address syscall to have the kernel zero and futex-wake the lock word as part of the exit syscall.
Diffstat (limited to 'src/stdio')
0 files changed, 0 insertions, 0 deletions