summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-19 14:10:02 +0000
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-19 14:10:02 +0000
commit8eaf21c5ad0316f8dd1ad269056c2aab80b31f1b (patch)
treecba1686875bb38c64a587e119f6080157e135309
parent650928847696f8967e2b56a88526d117727a9c86 (diff)
downloadgcc-8eaf21c5ad0316f8dd1ad269056c2aab80b31f1b.tar.gz
* include/posix-threads.h (_Jv_ThreadDebugSuspend): Declare.
(_Jv_ThreadDebugResume): Declare. (_Jv_ThreadDebugSuspendCount): Declare. * posix-threads.cc (_Jv_ThreadDebugSuspend): New function. (_Jv_ThreadDebugSuspendCount): New function. (_Jv_ThreadDebugResume): New function. * include/win32-threads.h (_Jv_ThreadDebugSuspend): Declare. (_Jv_ThreadDebugResume): Declare. (_Jv_ThreadDebugSuspendCount): Declare. * win32-threads.cc (_Jv_ThreadDebugSuspend): New function. (_Jv_ThreadDebugSuspendCount): New function. (_Jv_ThreadDebugResume): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114769 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog17
-rw-r--r--libjava/include/posix-threads.h16
-rw-r--r--libjava/include/win32-threads.h16
-rw-r--r--libjava/posix-threads.cc18
-rw-r--r--libjava/win32-threads.cc19
5 files changed, 82 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 211e3a4e5d9..e67b5f88878 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,20 @@
+2006-06-19 Keith Seitz <keiths@redhat.com>
+
+ * include/posix-threads.h (_Jv_ThreadDebugSuspend): Declare.
+ (_Jv_ThreadDebugResume): Declare.
+ (_Jv_ThreadDebugSuspendCount): Declare.
+ * posix-threads.cc (_Jv_ThreadDebugSuspend): New function.
+ (_Jv_ThreadDebugSuspendCount): New function.
+ (_Jv_ThreadDebugResume): New function.
+
+ * include/win32-threads.h (_Jv_ThreadDebugSuspend): Declare.
+ (_Jv_ThreadDebugResume): Declare.
+ (_Jv_ThreadDebugSuspendCount): Declare.
+ * win32-threads.cc (_Jv_ThreadDebugSuspend): New function.
+ (_Jv_ThreadDebugSuspendCount): New function.
+ (_Jv_ThreadDebugResume): New function.
+
+
2006-06-16 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Don't
diff --git a/libjava/include/posix-threads.h b/libjava/include/posix-threads.h
index ccb69ada1a2..fe648b79c0c 100644
--- a/libjava/include/posix-threads.h
+++ b/libjava/include/posix-threads.h
@@ -1,7 +1,7 @@
// -*- c++ -*-
// posix-threads.h - Defines for using POSIX threads.
-/* Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001, 2003, 2006 Free Software Foundation
This file is part of libgcj.
@@ -366,4 +366,18 @@ void _Jv_ThreadWait (void);
void _Jv_ThreadInterrupt (_Jv_Thread_t *data);
+// Increases a thread's suspend count. If the thread's previous
+// suspend count was zero, i.e., it is not suspended, this function
+// will suspend the thread. This function may be used to suspend
+// any thread from any other thread (or suspend itself).
+void _Jv_ThreadDebugSuspend (_Jv_Thread_t* data);
+
+// Decreases a thread's suspend count. If the thread's new thread
+// count is zero, the thread is resumed. This function may be used
+// by any thread to resume any other thread.
+void _Jv_ThreadDebugResume (_Jv_Thread_t* data);
+
+// Get the suspend count for a thread
+jint _Jv_ThreadDebugSuspendCount (_Jv_Thread_t* data);
+
#endif /* __JV_POSIX_THREADS__ */
diff --git a/libjava/include/win32-threads.h b/libjava/include/win32-threads.h
index ba9def10d68..4089b223ddb 100644
--- a/libjava/include/win32-threads.h
+++ b/libjava/include/win32-threads.h
@@ -1,7 +1,7 @@
// -*- c++ -*-
// win32-threads.h - Defines for using Win32 threads.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software
Foundation
This file is part of libgcj.
@@ -184,6 +184,20 @@ void _Jv_ThreadInterrupt (_Jv_Thread_t *data);
// See java/lang/natWin32Process.cc (waitFor) for an example.
HANDLE _Jv_Win32GetInterruptEvent (void);
+// Increases a thread's suspend count. If the thread's previous
+// suspend count was zero, i.e., it is not suspended, this function
+// will suspend the thread. This function may be used to suspend
+// any thread from any other thread (or suspend itself).
+void _Jv_ThreadDebugSuspend (_Jv_Thread_t* data);
+
+// Decreases a thread's suspend count. If the thread's new thread
+// count is zero, the thread is resumed. This function may be used
+// by any thread to resume any other thread.
+void _Jv_ThreadDebugResume (_Jv_Thread_t* data);
+
+// Get the suspend count for a thread
+jint _Jv_ThreadDebugSuspendCount (_Jv_Thread_t* data);
+
// Remove defines from <windows.h> that conflict with various things in libgcj code
#undef TRUE
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc
index 6ef50bda8e4..305b51a50d1 100644
--- a/libjava/posix-threads.cc
+++ b/libjava/posix-threads.cc
@@ -1,6 +1,6 @@
// posix-threads.cc - interface between libjava and POSIX threads.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation
This file is part of libgcj.
@@ -505,6 +505,22 @@ _Jv_ThreadWait (void)
pthread_mutex_unlock (&daemon_mutex);
}
+void
+_Jv_ThreadDebugSuspend (_Jv_Thread_t* data)
+{
+}
+
+void
+_Jv_ThreadDebugResume (_Jv_Thread_t* data)
+{
+}
+
+jint
+_Jv_ThreadDebugSuspendCount (_Jv_Thread_t* data)
+{
+ return -1;
+}
+
#if defined(SLOW_PTHREAD_SELF)
#include "sysdep/locks.h"
diff --git a/libjava/win32-threads.cc b/libjava/win32-threads.cc
index 35a16cdb6ac..92b569eef01 100644
--- a/libjava/win32-threads.cc
+++ b/libjava/win32-threads.cc
@@ -1,6 +1,6 @@
// win32-threads.cc - interface between libjava and Win32 threads.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software
Foundation, Inc.
This file is part of libgcj.
@@ -419,3 +419,20 @@ _Jv_ThreadInterrupt (_Jv_Thread_t *data)
SetEvent (data->interrupt_event);
LeaveCriticalSection (&data->interrupt_mutex);
}
+
+void
+_Jv_ThreadDebugSuspend (_Jv_Thread_t* data)
+{
+}
+
+void
+_Jv_ThreadDebugResume (_Jv_Thread_t* data)
+{
+}
+
+jint
+_Jv_ThreadDebugSuspendCount (_Jv_Thread_t* data)
+{
+ return -1;
+}
+