/* Externally visible interface of gscm.c * To verify: * egrep -v '^($| |[A-Z]|}|/|#|static|typedef|__attribute__|.*:$)' gscm.c */ #ifndef GSCM_H #define GSCM_H #include typedef size_t sc_value; #ifndef __SIZEOF_POINTER__ #if defined(__amd64__) #define __SIZEOF_POINTER__ 8 #elif defined(__i386__) #define __SIZEOF_POINTER__ 4 #endif #endif extern unsigned int sc_hugepages, sc_gc_verbose, sc_gc_thrash_factor; #ifdef NDEBUG #define assert(expr) (void)0 #else #define assert(expr) \ ((void)((expr) || (sc_assert_fail(__FILE__, __LINE__, __func__, #expr),0))) #endif void sc_assert_fail(const char *, unsigned long, const char *, const char *); void sc_exit(int status); void sc_write_error(const char *msg); void sc_error(const char *msg); void sc_error1(const char *msg, sc_value detail); void sc_perror(void); void sc_perror1(sc_value detail); void sc_gc(void); void sc_dump(sc_value v); void sc_init(sc_value heap_bytes); int sc_toplevel(int argc, char **argv); /* Internal platform-dependent functions */ void sc_wide_mul(sc_value *a, sc_value *b); void sc_wide_mul_signed(sc_value *a, sc_value *b); void sc_div_extended(sc_value *a_lo, sc_value *a_hi, sc_value b); int sc_bit_length(sc_value a); #endif