[kaffe] CVS kaffe (robilad): deinlined the rest of thread-internal.h

Kaffe CVS cvs-commits at kaffe.org
Sat Feb 19 16:59:55 PST 2005


PatchSet 5578 
Date: 2005/02/20 00:55:44
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
deinlined the rest of thread-internal.h

2005-02-20  Dalibor Topic  <robilad at kaffe.org>

* kaffe/kaffevm/systems/unix-pthreads/thread-internal.h,
kaffe/kaffevm/systems/unix-pthreads/thread-impl.c (jthread_current):
(jthread_disable_stop, jthread_enable_stop, jthread_suspend,
jthread_resume, jthread_from_data, jthread_get_usage):
Deinlined.

Members: 
	ChangeLog:1.3622->1.3623 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.72->1.73 
	kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.36->1.37 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3622 kaffe/ChangeLog:1.3623
--- kaffe/ChangeLog:1.3622	Sat Feb 19 18:33:59 2005
+++ kaffe/ChangeLog	Sun Feb 20 00:55:44 2005
@@ -1,3 +1,11 @@
+2005-02-20  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/systems/unix-pthreads/thread-internal.h,
+	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c (jthread_current): 
+	(jthread_disable_stop, jthread_enable_stop, jthread_suspend,
+	jthread_resume, jthread_from_data, jthread_get_usage): 
+	Deinlined.
+	
 2005-02-19  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffevm/systems/unix-pthreads/thread-internal.h,
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.72 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.73
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.72	Sat Feb 19 18:34:02 2005
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Sun Feb 20 00:55:48 2005
@@ -1693,3 +1693,108 @@
 {
   return (jthread_t)pthread_getspecific(ntKey);
 }
+
+/**
+ * Disable stopping the calling thread.
+ *
+ * Needed to avoid stopping a thread while it holds a lock.
+ */
+void jthread_disable_stop(void)
+{
+}
+
+/**
+ * Enable stopping the calling thread.
+ *
+ * Needed to avoid stopping a thread while it holds a lock.
+ */
+void jthread_enable_stop(void)
+{
+}
+
+/** 
+ * Stop a thread.
+ * 
+ * @param tid the thread to stop.
+ */
+void jthread_stop(UNUSED jthread_t tid)
+{
+}
+
+/**
+ * Dump some information about a thread to stderr.
+ *
+ * @param tid the thread whose info is to be dumped.
+ */
+void jthread_dumpthreadinfo(UNUSED jthread_t tid)
+{
+}
+
+/**
+ * Return the java.lang.Thread instance attached to a thread
+ *
+ * @param tid the native thread whose corresponding java thread
+ *            is to be returned.
+ * @return the java.lang.Thread instance.
+ */
+threadData *jthread_get_data(jthread_t tid)
+{
+        return (&tid->data);
+}
+
+/**
+ * Check for room on stack.
+ *
+ * @param left number of bytes that are needed
+ *
+ * @return true if @left bytes are free, otherwise false 
+ *
+ * Needed by intrp in order to implement stack overflow checking.
+ */
+bool jthread_stackcheck(int left)
+{
+	int rc;
+#if defined(STACK_GROWS_UP)
+        rc = jthread_on_current_stack((char*)&rc + left);
+#else
+        rc = jthread_on_current_stack((char*)&rc - left);
+#endif
+	return (rc);
+}
+
+/**
+ * Returns the upper bound of the stack of the calling thread.
+ *
+ * Needed by support.c in order to implement stack overflow checking. 
+ */
+void* jthread_stacklimit(void)
+{
+  jthread_t nt = jthread_current();
+#if defined(STACK_GROWS_UP)
+  return (void *)((uintp)nt->stackMax - STACKREDZONE);
+#else
+  return (void *)((uintp)nt->stackMin + STACKREDZONE);
+#endif
+}
+
+void jthread_suspend(UNUSED jthread_t jt, UNUSED void *suspender)
+{
+	/* TODO */
+}
+
+void jthread_resume(UNUSED jthread_t jt, UNUSED void *suspender)
+{
+	/* TODO */
+}
+
+jthread_t jthread_from_data(UNUSED threadData *td, UNUSED void *suspender)
+{
+	/* TODO */
+	return NULL;
+}
+
+jlong jthread_get_usage(UNUSED jthread_t jt)
+{
+	/* TODO */
+	return 0;
+}
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.36 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.37
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h:1.36	Sat Feb 19 18:34:02 2005
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-internal.h	Sun Feb 20 00:55:48 2005
@@ -113,30 +113,21 @@
  *
  * Needed to avoid stopping a thread while it holds a lock.
  */
-static inline
-void jthread_disable_stop(void)
-{
-}
+void jthread_disable_stop(void);
 
 /**
  * Enable stopping the calling thread.
  *
  * Needed to avoid stopping a thread while it holds a lock.
  */
-static inline
-void jthread_enable_stop(void)
-{
-}
+void jthread_enable_stop(void);
 
 /** 
  * Stop a thread.
  * 
  * @param tid the thread to stop.
  */
-static inline
-void jthread_stop(UNUSED jthread_t tid)
-{
-}
+void jthread_stop(UNUSED jthread_t tid);
 
 /**
  * Interrupt a thread.
@@ -157,10 +148,7 @@
  *
  * @param tid the thread whose info is to be dumped.
  */
-static inline
-void jthread_dumpthreadinfo(UNUSED jthread_t tid)
-{
-}
+void jthread_dumpthreadinfo(UNUSED jthread_t tid);
 
 /**
  * Return the java.lang.Thread instance attached to a thread
@@ -169,11 +157,7 @@
  *            is to be returned.
  * @return the java.lang.Thread instance.
  */
-static inline
-threadData *jthread_get_data(jthread_t tid)
-{
-        return (&tid->data);
-}
+threadData *jthread_get_data(jthread_t tid);
 
 /**
  * Test whether an address is on the stack of the calling thread.
@@ -195,17 +179,7 @@
  *
  * Needed by intrp in order to implement stack overflow checking.
  */
-static inline
-bool jthread_stackcheck(int left)
-{
-	int rc;
-#if defined(STACK_GROWS_UP)
-        rc = jthread_on_current_stack((char*)&rc + left);
-#else
-        rc = jthread_on_current_stack((char*)&rc - left);
-#endif
-	return (rc);
-}
+bool jthread_stackcheck(int left);
 
 /**
  * Extract the range of the stack that's in use.
@@ -225,16 +199,7 @@
  *
  * Needed by support.c in order to implement stack overflow checking. 
  */
-static inline
-void* jthread_stacklimit(void)
-{
-  jthread_t nt = jthread_current();
-#if defined(STACK_GROWS_UP)
-  return (void *)((uintp)nt->stackMax - STACKREDZONE);
-#else
-  return (void *)((uintp)nt->stackMin + STACKREDZONE);
-#endif
-}
+void* jthread_stacklimit(void);
 
 /*
  * Get the current stack limit.
@@ -356,31 +321,13 @@
  */
 void jthread_set_blocking (int fd, int blocking);
 
-static inline void
-jthread_suspend(UNUSED jthread_t jt, UNUSED void *suspender)
-{
-	/* TODO */
-}
-
-static inline void
-jthread_resume(UNUSED jthread_t jt, UNUSED void *suspender)
-{
-	/* TODO */
-}
-
-static inline jthread_t
-jthread_from_data(UNUSED threadData *td, UNUSED void *suspender)
-{
-	/* TODO */
-	return NULL;
-}
-
-static inline
-jlong jthread_get_usage(UNUSED jthread_t jt)
-{
-	/* TODO */
-	return 0;
-}
+void jthread_suspend(UNUSED jthread_t jt, UNUSED void *suspender);
+
+void jthread_resume(UNUSED jthread_t jt, UNUSED void *suspender);
+
+jthread_t jthread_from_data(UNUSED threadData *td, UNUSED void *suspender);
+
+jlong jthread_get_usage(UNUSED jthread_t jt);
 
 int jthread_is_interrupted(jthread_t jt);
 




More information about the kaffe mailing list