(declaim (inline current-thread-os-thread))
(defun current-thread-os-thread ()
- (sap-int
- (sb!vm::current-thread-offset-sap sb!vm::thread-os-thread-slot)))
+ #!+sb-thread
+ (sap-int (sb!vm::current-thread-offset-sap sb!vm::thread-os-thread-slot))
+ #!-sb-thread
+ 0)
(defun init-initial-thread ()
(/show0 "Entering INIT-INITIAL-THREAD")
if ((alloc_signal & FIXNUM_TAG_MASK) == 0) {
if ((signed long) alloc_signal <= 0) {
SetSymbolValue(ALLOC_SIGNAL, T, thread);
- thread_kill(thread->os_thread, SIGPROF);
+ raise(SIGPROF);
} else {
SetSymbolValue(ALLOC_SIGNAL,
alloc_signal - (1 << N_FIXNUM_TAG_BITS),
#define _SBCL_RUNTIME_H_
#if defined(LISP_FEATURE_SB_THREAD)
-#define thread_self pthread_self
+#define thread_self() pthread_self()
#define thread_kill pthread_kill
#define thread_sigmask pthread_sigmask
#define thread_mutex_lock(l) pthread_mutex_lock(l)
#define thread_mutex_unlock(l) pthread_mutex_unlock(l)
#else
-#define thread_self getpid
-#define thread_kill kill
+#define thread_self() 0
+#define thread_kill kill_safely
#define thread_sigmask sigprocmask
#define thread_mutex_lock(l) 0
#define thread_mutex_unlock(l) 0
return -1;
#else
int status;
- if (os_thread != getpid())
+ if (os_thread != 0)
lose("kill_safely: who do you want to kill? %d?\n", os_thread);
- status = kill(os_thread, signal);
+ status = raise(signal);
if (status == 0) {
return 0;
- } else if (status == ESRCH) {
- return -1;
} else {
- lose("cannot send signal %d to process %lu: %d, %s\n",
- signal, os_thread, status, strerror(status));
+ lose("cannot raise signal %d, %d %s\n",
+ signal, status, strerror(errno));
}
#endif
}
;;; 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".)
-"1.0.25.41"
+"1.0.25.42"