ref: 306763569e09bc8a6940b54f879a03d3ff8f3b65
parent: fe9e325f966ff11bb7311e51330ff812362cb41a
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Nov 27 20:08:20 EST 2015
Improve comments.
--- a/lib/thread/exit+linux-x64.s
+++ b/lib/thread/exit+linux-x64.s
@@ -10,12 +10,13 @@
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