Hi, folks, I am having some difficulty in understanding the usage
difference between hythread_xxx()  procedures and tmn_xxx() series for
thread suspension control.

1). Looks like they are used interchangeably (?) .

For example,

In file vm/vmcore/src/init/vm_init.cpp,

576:        hythread_suspend_enable();
577:        exn_print_stack_trace(stderr, exn_get());
578:        hythread_suspend_disable();


In file vm/vmcore/src/exception/exceptions.cpp,

619:    tmn_suspend_disable();
620:
621:    ManagedObject *exn = exc->object;
622:    exn_native_print_stack_trace(f, exn);
623:
624:    tmn_suspend_enable();

2). A code snippet I can't understand:

In file vm/vmcore/src/exception/exceptions.cpp,

549: inline void exn_native_print_stack_trace(FILE * f, ManagedObject * exn)
550: {
551:
552:    assert(hythread_is_suspend_enabled());

If we see the line 552 here and line 619 above (both in
exceptions.cpp), we may find they are contraditory (?) . The flow
disables suspension and calls into a function which requires
suspension enabled. Why is that?

Can DRLVM thread guy please give some explantions on the two questions?

Thanks,
xiaofeng
--
http://xiao-feng.blogspot.com

Reply via email to