diff --git a/src/kernel/core/vm/vm.c b/src/kernel/core/vm/vm.c index bb3d814c8a..2f77f57c93 100755 --- a/src/kernel/core/vm/vm.c +++ b/src/kernel/core/vm/vm.c @@ -1808,14 +1808,18 @@ int vm_init_postthread(kernel_args *ka) void permit_page_faults(void) { - // ToDo: implement me when TLS is there + struct thread *thread = thread_get_current_thread(); + if (thread != NULL) + atomic_add(&thread->page_faults_allowed, 1); } void forbid_page_faults(void) { - // ToDo: implement me when TLS is there + struct thread *thread = thread_get_current_thread(); + if (thread != NULL) + atomic_add(&thread->page_faults_allowed, -1); }