summaryrefslogtreecommitdiff
path: root/libjava/posix-threads.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-04 16:45:11 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-04 16:45:11 +0000
commit1ab1abbc80edd88d7d6e8d8b8401370cd6a3f766 (patch)
treea54f7fc855dc962968ba459fc5ba42c878180df3 /libjava/posix-threads.cc
parent27928b9a264dfc6c6e5e700f10a9c6a140889cc2 (diff)
downloadgcc-1ab1abbc80edd88d7d6e8d8b8401370cd6a3f766.tar.gz
* include/quick-threads.h (_Jv_ThreadCancel): Removed.
(_Jv_ThreadDestroy): Likewise. * include/no-threads.h (_Jv_ThreadCancel): Removed. (_Jv_ThreadDestroy): Likewise. * include/posix-threads.h (struct _Jv_Thread_t): Removed `exception' field. (_Jv_ThreadCancel): Removed decl. (_Jv_ThreadDestroy): Removed. * posix-threads.cc (_Jv_ThreadCancel): Removed. (throw_cleanup): Removed. (really_start): Don't push or pop cleanup. (_Jv_ThreadInitData): Don't initialize `exception' field. * java/lang/Thread.java (stop): Officially unimplemented. * java/lang/natThread.cc (stop): Officially unimplemented. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/posix-threads.cc')
-rw-r--r--libjava/posix-threads.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc
index ffd2f62fac1..19c7241cf88 100644
--- a/libjava/posix-threads.cc
+++ b/libjava/posix-threads.cc
@@ -284,7 +284,6 @@ _Jv_ThreadInitData (_Jv_Thread_t **data, java::lang::Thread *)
_Jv_Thread_t *info = new _Jv_Thread_t;
info->flags = 0;
- info->exception = NULL;
// FIXME register a finalizer for INFO here.
// FIXME also must mark INFO somehow.
@@ -304,26 +303,6 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio)
}
}
-
-// This is called as a cleanup handler when a thread is exiting. We
-// use it to throw the requested exception. It's entirely possible
-// that this approach is doomed to failure, in which case we'll need
-// to adopt some alternate. For instance, use a signal to implement
-// _Jv_ThreadCancel.
-static void
-throw_cleanup (void *data)
-{
- _Jv_Thread_t *td = (_Jv_Thread_t *) data;
- _Jv_Throw ((java::lang::Throwable *) td->exception);
-}
-
-void
-_Jv_ThreadCancel (_Jv_Thread_t *data, void *error)
-{
- data->exception = error;
- pthread_cancel (data->thread);
-}
-
// This function is called when a thread is started. We don't arrange
// to call the `run' method directly, because this function must
// return a value.
@@ -332,11 +311,9 @@ really_start (void *x)
{
struct starter *info = (struct starter *) x;
- pthread_cleanup_push (throw_cleanup, info->data);
pthread_setspecific (_Jv_ThreadKey, info->object);
pthread_setspecific (_Jv_ThreadDataKey, info->data);
info->method (info->object);
- pthread_cleanup_pop (0);
if (! (info->data->flags & FLAG_DAEMON))
{