Update of /cvsroot/sbcl/sbcl/src/runtime
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11064
Modified Files:
gencgc.c interrupt.c thread.c
Log Message:
0.8.7.29:
merged dan_b patches from sbcl-devel 2004-01-22:
"GC fixes: splay.lisp and SIGSTOP"
"Another one for the collection [bug 108]"
Index: gencgc.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/gencgc.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- gencgc.c 23 Jan 2004 16:54:31 -0000 1.48
+++ gencgc.c 29 Jan 2004 04:09:53 -0000 1.49
@@ -2752,7 +2752,7 @@
"/starting one full scan of newspace generation %d\n",
generation));
for (i = 0; i < last_free_page; i++) {
- /* note that this skips over open regions when it encounters them */
+ /* Note that this skips over open regions when it encounters them. */
if ((page_table[i].allocated & BOXED_PAGE)
&& (page_table[i].bytes_used != 0)
&& (page_table[i].gen == generation)
Index: interrupt.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/interrupt.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- interrupt.c 20 Dec 2003 12:08:11 -0000 1.53
+++ interrupt.c 29 Jan 2004 04:09:53 -0000 1.54
@@ -544,19 +544,26 @@
os_context_t *context = arch_os_get_context(&void_context);
struct thread *thread=arch_os_get_current_thread();
struct interrupt_data *data=thread->interrupt_data;
-
+ sigset_t ss;
+ int i;
if(maybe_defer_handler(sig_stop_for_gc_handler,data,
- signal,info,context)){
+ signal,info,context)) {
return;
}
/* need the context stored so it can have registers scavenged */
fake_foreign_function_call(context);
+ sigemptyset(&ss);
+ for(i=1;i<NSIG;i++) sigaddset(&ss,i); /* Block everything. */
+ sigprocmask(SIG_BLOCK,&ss,0);
+
get_spinlock(&all_threads_lock,thread->pid);
thread->state=STATE_STOPPED;
release_spinlock(&all_threads_lock);
- kill(thread->pid,SIGSTOP);
+
+ sigemptyset(&ss); sigaddset(&ss,SIG_STOP_FOR_GC);
+ sigwaitinfo(&ss,0);
undo_fake_foreign_function_call(context);
}
Index: thread.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/thread.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- thread.c 13 Dec 2003 15:55:56 -0000 1.22
+++ thread.c 29 Jan 2004 04:09:53 -0000 1.23
@@ -347,7 +347,7 @@
for(p=all_threads;p;p=p->next) {
if(p==th) continue;
p->state=STATE_RUNNING;
- kill(p->pid,SIGCONT);
+ kill(p->pid,SIG_STOP_FOR_GC);
}
release_spinlock(&all_threads_lock);
}
|