|
XenevaOS
|
#include <aurora.h>#include <clean.h>#include <Drivers/uart.h>#include <Mm/vmmngr.h>#include <Mm/pmmngr.h>#include <Mm/kmalloc.h>
Functions | |
| void | AuCleanMMap (AuProcess *proc) |
| AuCleanMMap – clean default mmap addresses. | |
| void | AuCleanHeapMem (AuProcess *proc) |
| AuCleanHeapMem – cleanup heap area of the process. | |
| void | AuCleanUserStack (AuProcess *proc, AuUserEntry *uentry) |
| AuCleanUserStack – clean up given user stack. | |
| void | AuCleanKernelStack (AuProcess *proc, AA64Thread *thr) |
| AuCleanKernelStack – clean up given kernel stack. | |
| void | AuProcessClean (AuProcess *parent, AuProcess *killable) |
| AuProcessClean – clean up a process. | |
BSD 2-Clause License
Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| void AuCleanHeapMem | ( | AuProcess * | proc | ) |
AuCleanHeapMem – cleanup heap area of the process.
| proc | – Pointer to the killable process |
| void AuCleanKernelStack | ( | AuProcess * | proc, |
| AA64Thread * | thr | ||
| ) |
AuCleanKernelStack – clean up given kernel stack.
| proc | – Pointer to killable process |
| thr | – Pointer to thread that needs kernel stack cleanup |
| void AuCleanMMap | ( | AuProcess * | proc | ) |
AuCleanMMap – clean default mmap addresses.
| proc | – Pointer to killable process |
| void AuCleanUserStack | ( | AuProcess * | proc, |
| AuUserEntry * | uentry | ||
| ) |
AuCleanUserStack – clean up given user stack.
| proc | – Pointer to killable process |
| uentry | – Pointer to user entry data structure |
AuProcessClean – clean up a process.
AuProcessClean – completely remove a process.
| parent | – Pointer to parent process |
| killable | – Killable process |
first clean up process_mmap areas
clean up heap areas
clean up user allocated areas
free up each sub thread's user stack
free up the user stack
clean up the kernel stack of sub threads
free up the kernel stack of main thread
check for argument blocks
Check for additional argument block allocated for sub threads
free up environment block
free up uentry structs
free up uentry structs of sub threads
now free up thread data structures
clear up the process data structure