Skip to content

Conversation

@niaow
Copy link
Member

@niaow niaow commented Mar 28, 2020

No description provided.

Copy link
Member

@aykevl aykevl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stylistic comments, although I'm still not understanding what is going on here (see #1010 (comment)).

}
const pollInterval = 256

// Run the scheduler until all tasks have finished.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not believe this sentence is true anymore with this PR: the scheduler runs until the main task has finished.


// poll checks for any events that are ready and pushes them onto the runqueue.
// It returns true if any tasks were ready.
func poll() bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this function is rather broad. Perhaps something like pollForEvents or checkForNewTasks? Or fillRunqueue?

}

// wait sleeps until any tasks are awoken by external events.
func wait() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this function. I think something like waitForEvents would be clearer.
(I'm assuming this will wait for the next interrupt soon, with wfe?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, #1040 adds an implementation for atsamd21 which directly uses wfe.

@niaow
Copy link
Member Author

niaow commented Jun 5, 2020

Closing in favor of #1142

@niaow niaow closed this Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants