release the resources of the process at exit(2)/exit_group(2).

This commit is contained in:
NAKAMURA Gou
2013-05-28 10:49:33 +09:00
parent 9354c82ee7
commit fa1be382c7
8 changed files with 140 additions and 27 deletions

View File

@@ -4,8 +4,14 @@
(X86_CPU_LOCAL_OFFSET_TSS + X86_TSS_OFFSET_SP0)
.text
.globl ihk_mc_switch_context
ihk_mc_switch_context:
/*
* rdi - ihk_mc_kernel_context_t *old_ctx
* rsi - ihk_mc_kernel_context_t *new_ctx
* rdx - void *prev
*/
pushfq
popq %rax
testq %rdi, %rdi
@@ -35,4 +41,5 @@ ihk_mc_switch_context:
popfq
movq 8(%rsi), %rbp
movq 24(%rsi), %rsi
movq %rdx,%rax
retq