harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Rebriy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4727) explicit allocation/deallocation of VM_thread structure
Date Tue, 04 Sep 2007 10:12:58 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524661
] 

Pavel Rebriy commented on HARMONY-4727:
---------------------------------------

Regarding changes of jthread_attach() and  attach_current_thread(), register_to_group() registers
native thread to hythread library. Iteration of native threads is implemented by hythread_iterator_create(),
hythread_iterator_next(), hythread_iterator_release(). Iterator locks global_thread_lock that
why no new threads can be created during iteration. GC enumerates only VM attached threads:

    hythread_t tm_thread = hythread_iterator_next(&iterator);    
    while (tm_thread) {
        VM_thread *thread = get_vm_thread(tm_thread);
        //assert(thread);
        if (thread && thread != current_vm_thread) {
            vm_enumerate_thread(thread);                                 <<<<<<<<<<<
VM thread enumiration
            ...
        }
        tm_thread = hythread_iterator_next(&iterator);
    }
    vm_enumerate_the_current_thread(current_vm_thread);

That means only thread which was called vm_attach() (that is initialized all C structs) goes
to enumiration.
Regarding enumeration protection no need to protect GC enumeration in side of thread manager.




> explicit allocation/deallocation of VM_thread structure 
> --------------------------------------------------------
>
>                 Key: HARMONY-4727
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4727
>             Project: Harmony
>          Issue Type: Sub-task
>            Reporter: weldon washburn
>         Attachments: explicit_alloc_and_dealloc_01.patch, explicit_alloc_and_dealloc_02.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message