shithub: mc

ref: 0f3f41fae775b2647cd0cdaf0a9ef395c19b9878
dir: /lib/thread/exit+linux-x64.s/

View raw version
/*
const thread.exit : (-> void)
*/
.globl thread$exit
thread$exit:
	/* munmap(base, size) */
	movq	$11,%rax	/* munmap */
	movq	%fs:0x08,%rdi	/* base */
	movq	%fs:0x10,%rsi	/* stksz */
	syscall

	/* thread_exit(0) */
	movq	$60,%rax	/* exit */
	xorq	%rdi,%rdi	/* 0 */
	syscall