]> gcc.gnu.org Git - gcc.git/commitdiff
quick-threads.h (_Jv_ThreadCancel): Removed.
authorTom Tromey <tromey@cygnus.com>
Thu, 4 Nov 1999 16:45:11 +0000 (16:45 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 4 Nov 1999 16:45:11 +0000 (16:45 +0000)
* 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.

From-SVN: r30392

libjava/ChangeLog
libjava/include/no-threads.h
libjava/include/posix-threads.h
libjava/include/quick-threads.h
libjava/java/lang/Thread.java
libjava/java/lang/natThread.cc
libjava/posix-threads.cc

index 012848ee3a8b50142df4b09cee382bdcba21c149..b1107ffe40e4dc31f90aee9e54b1dee33d4fd2bf 100644 (file)
@@ -1,3 +1,20 @@
+1999-11-04  Tom Tromey  <tromey@cygnus.com>
+
+       * 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.
+
 1999-11-02  Bryce McKinlay  <bryce@albatross.co.nz>
 
        * posix-threads.cc: Don't include boehm-config.h. Include gcconfig.h 
index 5de33868eaa302618476fc3772bb171b39a140cd..d59d7af1d91dc8f8f44fe0c8ada00540a064729e 100644 (file)
@@ -125,19 +125,6 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *, jint)
 {
 }
 
-inline void
-_Jv_ThreadCancel (_Jv_Thread_t *, void *)
-{
-  JvFail ("_Jv_ThreadCancel");
-}
-
-// Like Cancel, but doesn't run cleanups.
-inline void
-_Jv_ThreadDestroy (_Jv_Thread_t *)
-{
-  JvFail ("_Jv_ThreadDestroy");
-}
-
 void _Jv_ThreadStart (java::lang::Thread *, _Jv_Thread_t *,
                      _Jv_ThreadStartFunc *meth);
 
index 5c6cc7bdf4380b6d482c04bcd83f949a2a75371f..f49528354404d15f2fb003ae2b786efbf872b708 100644 (file)
@@ -76,9 +76,6 @@ typedef struct
 
   // Actual thread id.
   pthread_t thread;
-
-  // Exception we want to throw when cancelled.
-  void *exception;
 } _Jv_Thread_t;
 typedef void _Jv_ThreadStartFunc (java::lang::Thread *);
 
@@ -268,15 +265,6 @@ _Jv_ThreadYield (void)
 
 void _Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio);
 
-void _Jv_ThreadCancel (_Jv_Thread_t *data, void *error);
-
-// Like Cancel, but doesn't run cleanups.
-inline void
-_Jv_ThreadDestroy (_Jv_Thread_t *)
-{
-  JvFail ("_Jv_ThreadDestroy");
-}
-
 void _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
                      _Jv_ThreadStartFunc *meth);
 
index 4626add02f9fe7b12ccde3a830c6590a30bf94b0..eb5b916e83f6e4a286795a4dd435787620f9533b 100644 (file)
@@ -113,19 +113,6 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *, jint)
 {
 }
 
-inline void
-_Jv_ThreadCancel (_Jv_Thread_t *data, void *error)
-{
-  coop_terminate (*data, error);
-}
-
-// Like Cancel, but doesn't run cleanups.
-inline void
-_Jv_ThreadDestroy (_Jv_Thread_t *data)
-{
-  coop_terminate (*data, 0);
-}
-
 void _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
                      _Jv_ThreadStartFunc *meth);
 
index f21d3a3fb7d3ba2182d4b3bf5ad1bd728c61e932..7d172433d0625c6251d6ff901fdc453292c149cf 100644 (file)
@@ -181,7 +181,9 @@ public class Thread implements Runnable
 
   public final void stop ()
   {
-    stop (new ThreadDeath ());
+    // Argument doesn't matter, because this is no longer
+    // supported.
+    stop (null);
   }
 
   public final synchronized native void stop (Throwable e);
index c9d115cee3922130fe1af435fe4a3cc6a81de93a..b40e8bff3e7bc883817fdb51cb6d1ba6d343dbeb 100644 (file)
@@ -304,12 +304,7 @@ java::lang::Thread::start (void)
 void
 java::lang::Thread::stop (java::lang::Throwable *e)
 {
-  JvSynchronize sync (this);
-  checkAccess ();
-  if (! e)
-    _Jv_Throw (new NullPointerException);
-  natThread *nt = (natThread *) data;
-  _Jv_ThreadCancel (nt->thread, e);
+  JvFail ("java::lang::Thread::stop unimplemented");
 }
 
 void
index ffd2f62fac19fe83be7ec494e6be055626369fc5..19c7241cf885c4b4c97598c41a6713101aaaf257 100644 (file)
@@ -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))
     {
This page took 0.07556 seconds and 5 git commands to generate.