PATCH: Threads and SIGINT
Bryce McKinlay
bryce@albatross.co.nz
Thu Dec 23 17:18:00 GMT 1999
Tom Tromey wrote:
> 1. The new "jthread" field in _Jv_Thread_t needs a comment.
> 2. Now that we have jthread, we can remove the "object" field in
> struct starter in posix-threads.cc.
Now that I look at it, "jthread" is redundant. I removed it.
Attached is the patch that I checked in.
regards
[ bryce ]
1999-12-22 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/natObject.cc (notify): Throw message with
IllegalMonitorStateException.
(notifyAll): Ditto.
(wait): Ditto.
* java/lang/Thread.java (isInterrupted): Don't clear
interrupt_flag.
(isInterrupted_): New function, which does clear interrupt_flag.
(interrupt): Use `isInterrupted_'.
* java/lang/natThread.cc (interrupt): Add comment.
(join): Set `prev' in joiner loop.
Change various calls to `isInterrupted' to use `isInterrupted_'.
* posix-threads.cc (_Jv_CondWait): Allways use
pthread_cond_timedwait
on linux. Set result to 0 on an interrupt. Test interrupted
status
of java Thread object directly.
FLAG_INTERRUPTED: removed.
(_Jv_ThreadStart): Throw OutOfMemoryError if pthread_create
fails.
(_Jv_ThreadInterrupt): Don't set FLAG_INTERRUPTED.
(_Jv_InitThreads): Don't block SIGINT.
(_Jv_ThreadWait): Don't configure SIGINT handler.
More information about the Java-patches
mailing list