X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fruntime.h;h=30bccd7edc329427aa3251f32d2101b1523af996;hb=7c406887c08477181e869b1b98142d99b52990ac;hp=8304b77bb9dd0c7b4d35442032daa89a5ba612b1;hpb=e2b2b8f2156ede16d70a0bdd0cfad29ea31b8ccc;p=sbcl.git diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 8304b77..30bccd7 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -123,6 +123,21 @@ is_lisp_pointer(lispobj obj) return obj & 1; } +#include "fixnump.h" + +/* Is the Lisp object obj something with immediate nature (e.g. a + * fixnum or character or unbound marker)? */ +static inline int +is_lisp_immediate(lispobj obj) +{ + return (fixnump(obj) + || (widetag_of(obj) == CHARACTER_WIDETAG) +#if N_WORD_BITS == 64 + || (widetag_of(obj) == SINGLE_FLOAT_WIDETAG) +#endif + || (widetag_of(obj) == UNBOUND_MARKER_WIDETAG)); +} + /* Convert from a lispobj with type bits to a native (ordinary * C/assembly) pointer to the beginning of the object. */ static inline lispobj * @@ -182,4 +197,13 @@ typedef int boolean; extern void *successful_malloc (size_t size); extern char *copied_string (char *string); +#define RUNTIME_OPTIONS_MAGIC 0x31EBF355 +/* 1 for magic, 1 for boolean, 2 for struct runtime_options fields */ +#define RUNTIME_OPTIONS_WORDS (1 + 1 + 2) + +struct runtime_options { + size_t dynamic_space_size; + size_t thread_control_stack_size; +}; + #endif /* _SBCL_RUNTIME_H_ */