mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 22:18:21 +00:00
signals: handle SIGBUS, SIGSEGV, SIGILL etc
This commit is contained in:
+3
-2
@@ -363,8 +363,9 @@ bool vmm_pagefault(void *addr, bool user, int actions) {
|
||||
page_t *res = NULL;
|
||||
int error = vmmcache_getpage(range->vnode, range->offset + mapoffset, &res);
|
||||
if (error == ENXIO) {
|
||||
// TODO if error returned == ENXIO, raise an urgent SIGBUS on the calling thread
|
||||
__assert(!"TODO: sigbus");
|
||||
// address is past the last page of the file
|
||||
signal_signalthread(_cpu()->thread, SIGBUS, true);
|
||||
status = true;
|
||||
} else if (error) {
|
||||
printf("vmm: error on vmmcache_getpage(): %d\n", error);
|
||||
status = false;
|
||||
|
||||
Reference in New Issue
Block a user