harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov" <pmcfi...@gmail.com>
Subject Re: [drlvm][thread] question on hythread_suspend_enable and tmn_suspend_enable
Date Fri, 01 Jun 2007 09:30:21 GMT
hythread_suspend_enable and tmn_suspend_enable are just reversive operations
for those two. Yes, they are identical.

On 6/1/07, Pavel Pervov <pmcfirst@gmail.com> wrote:
>
> hythread_suspend_disalbe is allowed to be called recursively.
> tmn_suspend_disable is not. That is the difference.
>
> WBR,
>     Pavel.
>
>
>  On 6/1/07, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
> >
> > 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
> >
>
>
>
> --
> Pavel Pervov,
> Intel Enterprise Solutions Software Division




-- 
Pavel Pervov,
Intel Enterprise Solutions Software Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message