-
Notifications
You must be signed in to change notification settings - Fork 996
WIP - Interrupt-Driven Scheduling #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There is now a working demo of an async echo. This was tested on my arduino nano33, using the coroutines scheduler. The tasks scheduler is still not yet working with this. Also, we will need to update the timing code on all platforms to accommodate a source of wakeups that is not the timer. |
| time.Sleep(time.Second) | ||
| time.Sleep(time.Second) | ||
|
|
||
| //uart.Configure(machine.UARTConfig{TX: tx, RX: rx}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not quite understand why this prevented it from working. Can someone explain what is going on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because UART0 is already configured as part of the runtime setup on most platforms. Otherwise we cannot do any println() statements on panic etc.
|
As of now, this compiles and runs with the latest version of #607 . |
| func main() { | ||
| go delayedResume() | ||
| cond.Wait() | ||
| cond.Wait() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 calls to cond.Wait() here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test that subsequent calls will not block until the condition is cleared.
|
This PR is not going to be merged, but I am slowly ripping stuff out of here to make other smaller PRs. |
This PR attempts to add a mechanism for an interrupt to resume a goroutine.