+void lower_thread_control_stack_guard_page(struct thread *th)
+{
+ protect_control_stack_guard_page(0, th);
+ protect_control_stack_return_guard_page(1, th);
+ th->control_stack_guard_page_protected = NIL;
+ fprintf(stderr, "INFO: Control stack guard page unprotected\n");
+}
+
+void reset_thread_control_stack_guard_page(struct thread *th)
+{
+ memset(CONTROL_STACK_GUARD_PAGE(th), 0, os_vm_page_size);
+ protect_control_stack_guard_page(1, th);
+ protect_control_stack_return_guard_page(0, th);
+ th->control_stack_guard_page_protected = T;
+ fprintf(stderr, "INFO: Control stack guard page reprotected\n");
+}
+