Esempio n. 1
0
/**
 * Allocates VM_thread structure
 */
vm_thread_t jthread_allocate_thread()
{
    vm_thread_t vm_thread =
            (vm_thread_t)STD_CALLOC(1, sizeof(struct VM_thread));
    assert(vm_thread);
    ((hythread_t)vm_thread)->java_status = TM_STATUS_ALLOCATED;
    return vm_thread;
} // jthread_allocate_thread
Esempio n. 2
0
/**
 * Allocates VM_thread structure
 */
vm_thread_t jthread_allocate_thread()
{
    vm_thread_t vm_thread =
            (vm_thread_t)STD_CALLOC(1, sizeof(struct VM_thread));
    assert(vm_thread);
    ((hythread_t)vm_thread)->java_status = TM_STATUS_ALLOCATED;

#ifdef ORDER
    ((hythread_t)vm_thread)->p_tid = hythread_self()->thread_id;
    hythread_self()->thread_create_count++;
    ((hythread_t)vm_thread)->p_count = hythread_self()->thread_create_count;
#endif

    return vm_thread;
} // jthread_allocate_thread