This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: _Jv_ThreadRegister not setting FLAG_START...


David Daney wrote:

We are still looking into this issue, but thought this looks incorrect.


The first thread is registered via _Jv_ThreadRegister but does not call _Jv_ThreadStart because it is already running. Subsequent threads are started by _Jv_ThreadStart.

_Jv_ThreadStart does:
data->flags |= FLAG_START;

Which among other things allows the priority of a thread to be changed.

The result is that the priority of the first thread cannot be changed.

I think that data->flags |= FLAG_START; should be set for the first thread,
but I am not sure where.

All of this in the current mainline CVS sources (althought the problem
seems to be in 3.3.1 as well).

Guidance appreciated.


This will effect threads which are attached from JNI/CNI too.

I think the solution is to simply set FLAG_START in _Jv_ThreadRegister. Alternatively we could make a common "set_thread_started" function that is called by both _Jv_ThreadRegister and _Jv_ThreadStart, and does what block_sigchld does currently.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]