|
|
https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c File src/pkg/runtime/stack.c (right): https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c#new... src/pkg/runtime/stack.c:279: if(gp->stackguard1 != StackPreempt || preempt) here maybe: if(gp->stackguard1 != StackPreempt || !preempt) ??
https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c File src/pkg/runtime/stack.c (right): https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c#new... src/pkg/runtime/stack.c:279: if(gp->stackguard1 != StackPreempt || preempt) On 2013年05月29日 15:46:54, tw19881113 wrote: > here maybe: > if(gp->stackguard1 != StackPreempt || !preempt) ?? I think the current condition is correct.
https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c File src/pkg/runtime/stack.c (right): https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c#new... src/pkg/runtime/stack.c:279: if(gp->stackguard1 != StackPreempt || preempt) On 2013年05月29日 15:53:37, dvyukov wrote: > On 2013年05月29日 15:46:54, tw19881113 wrote: > > here maybe: > > if(gp->stackguard1 != StackPreempt || !preempt) ?? > > I think the current condition is correct. Here is what I think: If preempt == true and arrived here, it says the preemption was requested but can't preempt right now, so we must let gp->stackguard1 = StackPreempt, and let it try to preempt next time.
On Wed, May 29, 2013 at 8:04 PM, <tw19881113@gmail.com> wrote: > > https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c > File src/pkg/runtime/stack.c (right): > > https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c#new... > src/pkg/runtime/stack.c:279: if(gp->stackguard1 != StackPreempt || > preempt) > On 2013年05月29日 15:53:37, dvyukov wrote: >> >> On 2013年05月29日 15:46:54, tw19881113 wrote: >> > here maybe: >> > if(gp->stackguard1 != StackPreempt || !preempt) ?? > > >> I think the current condition is correct. > > Here is what I think: > If preempt == true and arrived here, it says the preemption was > requested but can't preempt right now, so we must let gp->stackguard1 = > StackPreempt, and let it try to preempt next time. No, if preempt == true, we will preempt now.
On 2013年05月29日 16:08:42, dvyukov wrote: > On Wed, May 29, 2013 at 8:04 PM, <mailto:tw19881113@gmail.com> wrote: > > > > https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c > > File src/pkg/runtime/stack.c (right): > > > > > https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/stack.c#new... > > src/pkg/runtime/stack.c:279: if(gp->stackguard1 != StackPreempt || > > preempt) > > On 2013年05月29日 15:53:37, dvyukov wrote: > >> > >> On 2013年05月29日 15:46:54, tw19881113 wrote: > >> > here maybe: > >> > if(gp->stackguard1 != StackPreempt || !preempt) ?? > > > > > >> I think the current condition is correct. > > > > Here is what I think: > > If preempt == true and arrived here, it says the preemption was > > requested but can't preempt right now, so we must let gp->stackguard1 = > > StackPreempt, and let it try to preempt next time. > > No, if preempt == true, we will preempt now. Yeah, you are right, I thought it the wrong way. Sorry for asking the stupid questions.