/* there are a few places in the C code that allocate data in the
* heap before Lisp starts. This is before interrupts are enabled,
* so we don't need to check for pseudo-atomic */
- gc_assert(SymbolValue(PSEUDO_ATOMIC_ATOMIC,th));
-
+#ifdef LISP_FEATURE_SB_THREAD
+ if(!SymbolValue(PSEUDO_ATOMIC_ATOMIC,th)) {
+ register u32 fs;
+ fprintf(stderr, "fatal error in thread 0x%x, pid=%d\n",
+ th,getpid());
+ __asm__("movl %fs,%0" : "=r" (fs) : );
+ fprintf(stderr, "fs is %x, th->tls_cookie=%x (should be identical)\n",
+ debug_get_fs(),th->tls_cookie);
+ lose("If you see this message before 2003.05.01, mail details to sbcl-devel\n");
+ }
+#else
+ gc_assert(SymbolValue(PSEUDO_ATOMIC_ATOMIC,th));
+#endif
+
/* maybe we can do this quickly ... */
new_free_pointer = region->free_pointer + nbytes;
if (new_free_pointer <= region->end_addr) {
lose(char *fmt, ...)
{
va_list ap;
- fprintf(stderr, "fatal error encountered in SBCL pid %d\n",getpid());
+ fprintf(stderr, "fatal error encountered in SBCL pid %d",getpid());
if (fmt) {
fprintf(stderr, ":\n");
va_start(ap, fmt);
#include <sys/file.h>
#include <sys/types.h>
#include <unistd.h>
+#include <errno.h>
#include "./signal.h"
#include "os.h"
return all_threads;
#endif
}
+struct thread *debug_get_fs() {
+ register u32 fs;
+ __asm__("movl %%fs,%0" : "=r" (fs) : );
+ return fs;
+}
/* free any arch/os-specific resources used by thread, which is now
* defunct. Not called on live threads
;;; 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.pre8.104"
+"0.pre8.105"