/*
 * This is a machine-generated file. Please do not edit it by hand.
 * (As of sbcl-0.8.14, it came from WRITE-CONFIG-H in genesis.lisp.)
 *
 * This file contains low-level information about the
 * internals of a particular version and configuration
 * of SBCL. It is used by the C compiler to create a runtime
 * support environment, an executable program in the host
 * operating system's native format, which can then be used to
 * load and run 'core' files, which are basically programs
 * in SBCL's own format.
 */
#ifndef SBCL_GENESIS_WEAK_POINTER
#define SBCL_GENESIS_WEAK_POINTER
#ifdef __ASSEMBLER__

/* These offsets are SLOT-OFFSET * N-WORD-BYTES - LOWTAG
 * so they work directly on tagged addresses. */

#define WEAK_POINTER_VALUE_OFFSET -3
#define WEAK_POINTER_NEXT_OFFSET 1
#define WEAK_POINTER_SIZE 3

#else /* __ASSEMBLER__ */

#include "lispobj.h"
struct weak_pointer {
    lispobj header;
    lispobj value;
    struct weak_pointer * next;
};
extern struct weak_pointer *weak_pointer_chain;
static inline int weakptr_vectorp(struct weak_pointer* wp) { return !(wp->header & 0x200); }
#define set_weak_pointer_next(wp, x) wp->next = x
#define get_weak_pointer_next(wp) wp->next
#define WEAK_POINTER_CHAIN_END (void*)(intptr_t)1
#define reset_weak_pointer_next(wp) set_weak_pointer_next(wp,0)
#define in_weak_pointer_list(wp) (get_weak_pointer_next(wp)!=0)

#endif /* __ASSEMBLER__ */
#endif
