jthread and handleIO(true)
EP510777 at exchange.FRANCE.NCR.com
Thu Nov 19 09:26:17 PST 1998
With AWT, I notice some lock of Kaffe and I found the conditions:
A thread (AWT-event) waits for a small time.
All other threads wait for something so reschedule() call handleIO(true),
but readsPending and writesPending are empty.
With NCR MP-RAS, select() calls poll() with the following arguments:
poll(0x08823950, 0, -1)
0 is the number of file descriptors and -1 is INFINITE TIME.
But sigPending == 1 and pendingSig[SIGALRM] == 1
Now, Kaffe waits for a event on NONE FILE...
As SIGALRM is already send and SIGVTALRM is only send when the process
runs: Kaffe waits forever...
The general case is:
. A thread waits for a small time.
. All other threads are SUSPENDED (maybe I/O or ALARM)
. SIGALRM is received while reschedule() loop and marked as pending.
. reschedule() call handleIO(true) and wait for an I/O event or
an alarm event before process pending signals.
I think you should check sigPending in reschedule() before called
In handleIO(), I think you can remove the sigPending check if sleep as
handleIO(true) is only called from reschedule().
In any case, you can safety remove alarmBlocked stuff as catchSignal()
already unblock them when there are received.
More information about the kaffe