]> xenbits.xensource.com Git - unikraft/libs/musl.git/commit
Add custom `unmapself` function as glue code
authorDragos Iulian Argint <dragosargint21@gmail.com>
Sun, 14 Aug 2022 22:01:17 +0000 (01:01 +0300)
committerUnikraft <monkey@unikraft.io>
Thu, 24 Nov 2022 11:56:36 +0000 (11:56 +0000)
commit428a174fd5c2bd291db1c89ff108960f4687c664
tree199cb689586eda3dcd9627e0db10be0e415d9374
parentaeed46206205cd26d5dc86f6b2009dc71433a91c
Add custom `unmapself` function as glue code

`unmapself()` provides a detached thread the ability
to free the memory region allocated for the stack and
TLS. In the original version, this function does
`munmap()', which will deallocate the thread's stack,
after which it executes exit() (NB: SYS_exit). This
works because there is another stack in the Kernel.
Since this does not exist in Unikraft, we implement
our version of unmapself.

Signed-off-by: Dragos Iulian Argint <dragosargint21@gmail.com>
Reviewed-by: Florin Postolache <florin.postolache80@gmail.com>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Robert Kuban <robert.kuban@opensynergy.com>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #9
__uk_unmapself.c [new file with mode: 0644]