0.9.2.9: thread objects
[sbcl.git] / src / code / exhaust.lisp
1 ;;;; detecting and handling exhaustion of fundamental system resources
2 ;;;; (stack or heap)
3
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
12
13 (in-package "SB!KERNEL")
14 (define-alien-routine ("protect_control_stack_guard_page"
15                        %protect-control-stack-guard-page)
16     sb!alien:void
17   (thread-sap system-area-pointer)
18   (protect-p sb!alien:int))
19 (defun protect-control-stack-guard-page (n)
20   (%protect-control-stack-guard-page 
21    (sb!thread::thread-%sap sb!thread:*current-thread*) (if n 1 0)))