#ifdef __NetBSD__
#include <sys/resource.h>
+#include <sys/sysctl.h>
#include <string.h>
static void netbsd_init();
static void netbsd_init()
{
struct rlimit rl;
+ int mib[2], osrev;
+ size_t len;
+
+ /* Are we running on a sufficiently functional kernel? */
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_OSREV;
+
+ len = sizeof(osrev);
+ sysctl(mib, 2, &osrev, &len, NULL, 0);
+
+ /* If we're older than 2.0... */
+ if (osrev < 200000000) {
+ fprintf(stderr, "osrev = %d (needed at least 200000000).\n", osrev);
+ lose("NetBSD kernel too old to run sbcl.\n");
+ }
/* NetBSD counts mmap()ed space against the process's data size limit,
* so yank it up. This might be a nasty thing to do? */
#include <sys/types.h>
#include <unistd.h>
#include <stddef.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#include "os.h"
#include "interrupt.h"
#ifdef LISP_FEATURE_GENCGC
* much stuff like struct thread and all_threads to be defined, which
* usually aren't by that time. So, it's here instead. Sorry */
-inline static struct thread *arch_os_get_current_thread() {
+static inline struct thread *arch_os_get_current_thread() {
#if defined(LISP_FEATURE_SB_THREAD) && defined (LISP_FEATURE_X86)
register struct thread *me=0;
if(all_threads)
return &context->uc_mcontext.gregs[16];
#elif defined __FreeBSD__
return &context->uc_mcontext.mc_eflags;
-#elif defined __OpenBSD__ || defined __NetBSD__
+#elif defined __OpenBSD__
return &context->sc_eflags;
#elif defined __NetBSD__
return &(context->uc_mcontext.__gregs[_REG_EFL]);
/* FIXME: Do we also want
* #define ARCH_HAS_FLOAT_REGISTERS
* here? (The answer wasn't obvious to me when merging the
- * architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
+ * architecture-abstracting patches for CSR's SPARC port. -- WHN
+ * 2002-02-15) */
+#ifdef LISP_FEATURE_SB_THREAD
static inline void
get_spinlock(lispobj *word,int value)
{
*word=0;
}
+#else
+
+static inline void
+get_spinlock(lispobj *word, int value)
+{
+ *word = value;
+}
+
+static inline void
+release_spinlock(lispobj *word) {
+ *word = 0;
+}
+
+#endif /* LISP_FEATURE_SB_THREAD */
#endif /* _X86_ARCH_H */
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.9.36"
+"0.8.9.37"