Skip to content
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

Make spawnulator a service #106

Merged
merged 6 commits into from
Jun 30, 2023
Merged

Make spawnulator a service #106

merged 6 commits into from
Jun 30, 2023

Conversation

jamesmunns
Copy link
Contributor

This PR moves the spawnulator into a kernel service, allowing for potentially
"non-hierarchical" forth instances (e.g. a tid0 gui and tid1 sermux instance) to
use the same spawnulator.

@jamesmunns jamesmunns requested a review from hawkw June 27, 2023 02:19
@netlify
Copy link

netlify bot commented Jun 27, 2023

Deploy Preview for merry-scone-cc7a60 ready!

Name Link
🔨 Latest commit 337f7b7
🔍 Latest deploy log https://app.netlify.com/sites/merry-scone-cc7a60/deploys/649f61229b3bda0008fbd755
😎 Deploy Preview https://deploy-preview-106--merry-scone-cc7a60.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jamesmunns
Copy link
Contributor Author

There is a slight footgun, in that it is possible to try to spawn forth tasks without
having spawned the spawnulator, which I did run into during testing.

Open to suggestions on how to fix this, including maybe lazily/racily spawning the spawnulator instead of doing the normal "wait until the server appears" behavior.

Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

always be spawnulating

source/kernel/src/drivers/mod.rs Outdated Show resolved Hide resolved
source/kernel/src/drivers/forth_spawnulator.rs Outdated Show resolved Hide resolved
@jamesmunns
Copy link
Contributor Author

There is a slight footgun, in that it is possible to try to spawn forth tasks without
having spawned the spawnulator, which I did run into during testing.

I ran into this again while developing #110, which means I should definitely fix it.

@hawkw
Copy link
Contributor

hawkw commented Jun 28, 2023

There is a slight footgun, in that it is possible to try to spawn forth tasks without

having spawned the spawnulator, which I did run into during testing.

I ran into this again while developing #110, which means I should definitely fix it.

maybe we could have an atomic flag that gets set when the spawnulator is spawnulated? and check that every time we spawn a forth task. minor overhead but it's probably fine.

@jamesmunns jamesmunns merged commit 27d80b1 into main Jun 30, 2023
10 checks passed
@jamesmunns jamesmunns deleted the james/spawn-u-lazier branch June 30, 2023 23:20
@hawkw hawkw added this to the beepberry computer v0.1 milestone Jul 10, 2023
@jamesmunns jamesmunns added area: forth3 Related to the forth3 interpreter area: kernel Related to the cross-platform kernel labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: forth3 Related to the forth3 interpreter area: kernel Related to the cross-platform kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants