[kaffe] CVS kaffe (dalibor): Fixed pthreads compilation for g++

Kaffe CVS cvs-commits at kaffe.org
Wed May 26 15:31:02 PDT 2004


PatchSet 4787 
Date: 2004/05/26 22:13:14
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed pthreads compilation for g++

2004-05-26  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:
        (jcondvar_signal, jcondvar_broadcast)
        Moved UNUSED in front of variables for g++.

        * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
        (jthread_relaxstack) New function.

        * kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:
        (jthread_stop, jthread_atexit, jthread_dumpthreadinfo,
        jthread_spinon, jthread_spinoff, jthread_suspend,
        jthread_resume, jthread_from_data, jthread_get_usage,
        jthread_is_interrupted) Moved UNUSED in front of variables
        for g++.
        (jthread_relaxstack) Deinlined to fix compilation problems
        with g++.

Members: 
	ChangeLog:1.2356->1.2357 
	kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:1.6->1.7 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.24->1.25 
	kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.14->1.15 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2356 kaffe/ChangeLog:1.2357
--- kaffe/ChangeLog:1.2356	Wed May 26 21:33:43 2004
+++ kaffe/ChangeLog	Wed May 26 22:13:14 2004
@@ -1,5 +1,23 @@
 2004-05-26  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:
+	(jcondvar_signal, jcondvar_broadcast) 
+	Moved UNUSED in front of variables for g++.
+
+	* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
+	(jthread_relaxstack) New function.
+
+	* kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:
+	(jthread_stop, jthread_atexit, jthread_dumpthreadinfo, 
+	jthread_spinon, jthread_spinoff, jthread_suspend,
+	jthread_resume, jthread_from_data, jthread_get_usage,
+	jthread_is_interrupted) Moved UNUSED in front of variables 
+	for g++.
+	(jthread_relaxstack) Deinlined to fix compilation problems
+	with g++.
+
+2004-05-26  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/systems/unix-jthreads/jthread.h:
 	Moved UNUSED in front of variables for g++.
 
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:1.6 kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:1.7
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:1.6	Sun Apr 25 19:57:51 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h	Wed May 26 22:13:19 2004
@@ -83,14 +83,14 @@
 
 static inline
 void
-jcondvar_signal( jcondvar* cv, jmutex* mux UNUSED)
+jcondvar_signal( jcondvar* cv, UNUSED jmutex* mux)
 {
   pthread_cond_signal( cv );
 }       
 
 static inline
 void
-jcondvar_broadcast ( jcondvar* cv, jmutex* mux UNUSED)
+jcondvar_broadcast ( jcondvar* cv, UNUSED jmutex* mux)
 {
   pthread_cond_broadcast( cv );
 }
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.24 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.25
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.24	Sun Apr 25 19:57:51 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Wed May 26 22:13:19 2004
@@ -1227,3 +1227,27 @@
   walkConservative( base, size);
 }
 #endif
+
+/*
+ * Get the current stack limit.
+ * Adapted from kaffe/kaffevm/systems/unix-jthreads/jthread.h
+ */
+void jthread_relaxstack(int yes)
+{
+        if( yes )
+        {
+#if defined(STACK_GROWS_UP)
+                (uintp)jthread_current()->stackMax += STACKREDZONE;
+#else
+                (uintp)jthread_current()->stackMin -= STACKREDZONE;
+#endif
+        }
+        else
+        {
+#if defined(STACK_GROWS_UP)
+                (uintp)jthread_current()->stackMax -= STACKREDZONE;
+#else
+                (uintp)jthread_current()->stackMin += STACKREDZONE;
+#endif
+        }
+}
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.14 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.15
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.14	Sun Apr 25 19:57:51 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h	Wed May 26 22:13:20 2004
@@ -125,7 +125,7 @@
  * @param tid the thread to stop.
  */
 static inline
-void jthread_stop(jthread_t tid UNUSED)
+void jthread_stop(UNUSED jthread_t tid)
 {
 }
 
@@ -142,7 +142,7 @@
  * @param func the func to execute.
  */
 static inline
-void jthread_atexit(void (* func)(void) UNUSED)
+void jthread_atexit(UNUSED void (* func)(void))
 {
 }
 
@@ -152,7 +152,7 @@
  * @param tid the thread whose info is to be dumped.
  */
 static inline
-void jthread_dumpthreadinfo(jthread_t tid UNUSED)
+void jthread_dumpthreadinfo(UNUSED jthread_t tid)
 {
 }
 
@@ -257,28 +257,8 @@
 
 /*
  * Get the current stack limit.
- * Adapted from kaffe/kaffevm/systems/unix-jthreads/jthread.h
  */
-static inline 
-void jthread_relaxstack(int yes)
-{
-	if( yes )
-	{
-#if defined(STACK_GROWS_UP)
-		(uintp)jthread_current()->stackMax += STACKREDZONE;
-#else
-		(uintp)jthread_current()->stackMin -= STACKREDZONE;
-#endif
-	}
-	else
-	{
-#if defined(STACK_GROWS_UP)
-		(uintp)jthread_current()->stackMax -= STACKREDZONE;
-#else
-		(uintp)jthread_current()->stackMin += STACKREDZONE;
-#endif
-	}
-}
+void jthread_relaxstack(int yes);
 
 /**
  * yield.
@@ -295,7 +275,7 @@
  *
  */
 static inline
-void jthread_spinon(int dummy UNUSED)
+void jthread_spinon(UNUSED int dummy)
 {
 }
 
@@ -304,7 +284,7 @@
  *
  */
 static inline
-void jthread_spinoff(int dummy UNUSED)
+void jthread_spinoff(UNUSED int dummy)
 {
 }
 
@@ -400,33 +380,33 @@
 void jthread_set_blocking (int fd, int blocking);
 
 static inline void
-jthread_suspend(jthread_t jt UNUSED, void *suspender UNUSED)
+jthread_suspend(UNUSED jthread_t jt, UNUSED void *suspender)
 {
 	/* TODO */
 }
 
 static inline void
-jthread_resume(jthread_t jt UNUSED, void *suspender UNUSED)
+jthread_resume(UNUSED jthread_t jt, UNUSED void *suspender)
 {
 	/* TODO */
 }
 
 static inline jthread_t
-jthread_from_data(threadData *td UNUSED, void *suspender UNUSED)
+jthread_from_data(UNUSED threadData *td, UNUSED void *suspender)
 {
 	/* TODO */
 	return NULL;
 }
 
 static inline
-jlong jthread_get_usage(jthread_t jt UNUSED)
+jlong jthread_get_usage(UNUSED jthread_t jt)
 {
 	/* TODO */
 	return 0;
 }
 
 static inline
-int jthread_is_interrupted(jthread_t jt UNUSED)
+int jthread_is_interrupted(UNUSED jthread_t jt)
 {
 	/* TODO */
 	return 0;




More information about the kaffe mailing list