Try to make the :lurking-threads test more robust.
[sbcl.git] / src / runtime / cheneygc-internal.h
blobdc5f738a5231ffdaeeb7b61d4964cde5e6027957
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #include "os.h" /* for os_context_t */
14 extern lispobj *from_space;
15 extern lispobj *from_space_free_pointer;
16 #define compacting_p() (1) /* always */
18 extern lispobj *new_space;
19 extern lispobj *new_space_free_pointer;
22 /* predicates */
23 /* #if defined(DEBUG_SPACE_PREDICATES) */
24 #if 0
25 boolean
26 from_space_p(lispobj object)
28 lispobj *ptr;
30 /* this can be called for untagged pointers as well as for
31 descriptors, so this assertion's not applicable
32 gc_assert(is_lisp_pointer(object));
34 ptr = native_pointer(object);
36 return ((from_space <= ptr) &&
37 (ptr < from_space_free_pointer));
40 boolean
41 new_space_p(lispobj object)
43 lispobj *ptr;
45 /* gc_assert(is_lisp_pointer(object)); */
47 ptr = native_pointer(object);
49 return ((new_space <= ptr) &&
50 (ptr < new_space_free_pointer));
53 #else
55 #define from_space_p(ptr) \
56 ((from_space <= ((lispobj *) ((uintptr_t) ptr))) && \
57 (((lispobj *) ((uintptr_t) ptr))< from_space_free_pointer))
59 #define new_space_p(ptr) \
60 ((new_space <= ((lispobj *) ((uintptr_t) ptr))) && \
61 (((lispobj *) ((uintptr_t) ptr)) < new_space_free_pointer))
63 #endif
65 extern boolean cheneygc_handle_wp_violation(os_context_t*, void*);