mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
fixes
This commit is contained in:
@@ -4,7 +4,7 @@ arch_context_switch:
|
||||
xor rsi, rsi ; is syscall? (no)
|
||||
extern sched_userspacecheck
|
||||
call sched_userspacecheck ; compiled with no_caller_saved_registers
|
||||
|
||||
cli
|
||||
; rdi is the pointer to the context struct
|
||||
mov rsp, rdi
|
||||
|
||||
|
||||
@@ -240,6 +240,7 @@ arch_syscall_entry:
|
||||
mov rcx, rax ; return value
|
||||
extern sched_userspacecheck ; context, return, errno
|
||||
call sched_userspacecheck ; compiled with __attribute__((no_caller_saved_registers))
|
||||
cli
|
||||
|
||||
; restore context
|
||||
add rsp, 32 ; r9 argument, cr2, gs, and fs are not popped.
|
||||
|
||||
@@ -262,7 +262,7 @@ int vmmcache_syncvnode(vnode_t *vnode, uintmax_t offset, size_t size) {
|
||||
page_t *page = vnode->pages;
|
||||
page_t *vnodedirtylist = NULL;
|
||||
for (; page; page = page->vnodenext) {
|
||||
if (page->offset < offset || page->offset >= top)
|
||||
if (page->offset < offset || page->offset >= top || (page->offset & PAGE_FLAGS_DIRTY) == 0)
|
||||
continue;
|
||||
|
||||
// remove from write list and add to an internal list using the write pointers
|
||||
@@ -391,7 +391,7 @@ void vmmcache_init() {
|
||||
memset(table, 0, TABLE_SIZE * sizeof(page_t *));
|
||||
|
||||
SEMAPHORE_INIT(&sync, 0);
|
||||
writerthread = sched_newthread(writer, PAGE_SIZE * 4, 1, NULL, NULL);
|
||||
writerthread = sched_newthread(writer, PAGE_SIZE * 16, 1, NULL, NULL);
|
||||
__assert(writerthread);
|
||||
sched_queue(writerthread);
|
||||
vmmcache_sync();
|
||||
|
||||
Reference in New Issue
Block a user