* src/mm/boehm-gc/pthread_stop_world.c (cacao_suspendhandler):
authortwisti <none@none>
Wed, 30 May 2007 19:43:36 +0000 (19:43 +0000)
committertwisti <none@none>
Wed, 30 May 2007 19:43:36 +0000 (19:43 +0000)
Commented.
(GC_suspend_handler): Commented cacao_suspendhandler call.
(GC_signum1, GC_signum2): Define for all configurations (hope that
works).

* src/threads/native/threads.c: Commented all critical-sections code,
as it does not work anyway and it does not compile everywhere.

src/mm/boehm-gc/pthread_stop_world.c
src/threads/native/threads.c

index c24d251073bf36dad21974f70a85923f3258d3e4..5ec08c6cd652ce8983622db2facadc6b502ac448 100644 (file)
@@ -130,7 +130,7 @@ sem_t GC_suspend_ack_sem;
 #endif
 
 void GC_suspend_handler_inner(ptr_t sig_arg);
-int cacao_suspendhandler(void *);
+/* int cacao_suspendhandler(void *); */
 
 #if defined(IA64) || defined(HP_PA)
 extern void GC_with_callee_saves_pushed();
@@ -149,8 +149,8 @@ void GC_suspend_handler(int sig, siginfo_t *info, void *uctx)
 {
    int old_errno = errno;
 
-   if (cacao_suspendhandler(uctx))
-     return;
+/*    if (cacao_suspendhandler(uctx)) */
+/*      return; */
 
    GC_suspend_handler_inner((ptr_t)(word)sig);
    errno = old_errno;
@@ -559,6 +559,8 @@ void GC_stop_init() {
 #     endif
 }
 
+#endif
+
 /* Added for cacao */
 int GC_signum1()
 {
@@ -570,5 +572,3 @@ int GC_signum2()
     return SIG_THR_RESTART;
 }
 /* cacao END */
-
-#endif
index d9df48ed01b475b72d0a1f7aacefd00155d8b4cd..0ab07cf9b9a79c63b971efcdc4c267283a609a4e 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.c 7966 2007-05-25 12:41:03Z pm $
+   $Id: threads.c 7981 2007-05-30 19:43:36Z twisti $
 
 */
 
@@ -236,6 +236,11 @@ static pthread_mutex_t stopworldlock;
 static pthread_mutex_t mutex_join;
 static pthread_cond_t  cond_join;
 
+/* XXX We disable that whole bunch of code until we have the exact-GC
+   running. */
+
+#if 0
+
 /* this is one of the STOPWORLD_FROM_ constants, telling why the world is     */
 /* being stopped                                                              */
 static volatile int stopworldwhere;
@@ -247,6 +252,8 @@ static pthread_mutex_t suspend_ack_lock = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t suspend_cond = PTHREAD_COND_INITIALIZER;
 #endif
 
+#endif /* 0 */
+
 /* mutexes used by the fake atomic instructions                               */
 #if defined(USE_FAKE_ATOMIC_INSTRUCTIONS)
 pthread_mutex_t _atomic_add_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -348,7 +355,7 @@ void threads_sem_post(sem_t *sem)
 void lock_stopworld(int where)
 {
        pthread_mutex_lock(&stopworldlock);
-       stopworldwhere = where;
+/*     stopworldwhere = where; */
 }
 
 
@@ -360,10 +367,15 @@ void lock_stopworld(int where)
 
 void unlock_stopworld(void)
 {
-       stopworldwhere = 0;
+/*     stopworldwhere = 0; */
        pthread_mutex_unlock(&stopworldlock);
 }
 
+/* XXX We disable that whole bunch of code until we have the exact-GC
+   running. */
+
+#if 0
+
 #if !defined(__DARWIN__)
 /* Caller must hold threadlistlock */
 static s4 threads_cast_sendsignals(s4 sig)
@@ -566,6 +578,9 @@ static void threads_sigsuspend_handler(ucontext_t *_uc)
 #endif
 }
 
+#endif
+
+
 /* This function is called from Boehm GC code. */
 
 int cacao_suspendhandler(ucontext_t *_uc)
@@ -576,10 +591,11 @@ int cacao_suspendhandler(ucontext_t *_uc)
        threads_sigsuspend_handler(_uc);
        return 1;
 }
-#endif
 
 #endif /* DISABLE_GC */
 
+#endif /* 0 */
+
 
 /* threads_set_current_threadobject ********************************************
 
@@ -690,7 +706,7 @@ void threads_impl_preinit(void)
        pthread_key_create(&threads_current_threadobject_key, NULL);
 #endif
 
-       threads_sem_init(&suspend_ack, 0, 0);
+/*     threads_sem_init(&suspend_ack, 0, 0); */
 }