summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-11-28 01:08:20 -0800
committerOri Bernstein <ori@eigenstate.org>2015-11-28 01:08:20 -0800
commit306763569e09bc8a6940b54f879a03d3ff8f3b65 (patch)
tree441cf31ab30cadc052708ee804c505625e418542 /lib/thread
parentfe9e325f966ff11bb7311e51330ff812362cb41a (diff)
downloadmc-306763569e09bc8a6940b54f879a03d3ff8f3b65.tar.gz
Improve comments.
Diffstat (limited to 'lib/thread')
-rw-r--r--lib/thread/exit+linux-x64.s3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/thread/exit+linux-x64.s b/lib/thread/exit+linux-x64.s
index 38e4fa3..a54e802 100644
--- a/lib/thread/exit+linux-x64.s
+++ b/lib/thread/exit+linux-x64.s
@@ -10,12 +10,13 @@ thread$exit:
andq $~0xfff,%rdi /* align it */
addq $0x1000,%rdi
- /* syscall args */
+ /* munmap(base, size) */
movq $11,%rax /* munmap */
movq -8(%rdi),%rsi /* size */
subq %rsi,%rdi /* move to base ptr */
syscall
+ /* thread_exit(0) */
movq $60,%rax /* exit */
xorq %rdi,%rdi /* 0 */
syscall