diff options
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/posix-threads.h | 16 | ||||
-rw-r--r-- | libjava/include/win32-threads.h | 16 |
2 files changed, 30 insertions, 2 deletions
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 |