11 years, 6 months ago
(2013-05-29 16:04:34 UTC)
#3
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 ...
11 years, 6 months ago
(2013-05-29 16:08:42 UTC)
#4
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> ...
11 years, 6 months ago
(2013-05-30 00:28:46 UTC)
#5
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.
Issue 9136045: runtime: preemptive scheduler
Created 11 years, 6 months ago by dvyukov
Modified 11 years, 5 months ago
Reviewers: Tw
Base URL:
Comments: 3