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

Implement simple sleep for thread_sync. #99

Merged
merged 1 commit into from Oct 16, 2022
Merged

Conversation

dbittman
Copy link
Contributor

Implements an intended part of the thread_sync API: If an empty slice of operations is passed to thread_sync along with a timeout Duration, thread_sync will just sleep the specified amount of time, allowing for easy and efficient sub-second sleeping.

Addresses #98

Alternatively, we could pass a sleep operation to a local stack word that will never awaken, and thus use timeout for the same effect. This would make the in-kernel implementation slightly simpler, but would make sleeping more expensive and involve more coordination.

If an empty slice of operations is passed to thread_sync along with
a timeout Duration, thread_sync will just sleep the specified amount
of time, allowing for easy and efficient sub-second sleeping.
@dbittman dbittman added bug Something isn't working kernel Internal kernel issues labels Oct 15, 2022
@dbittman dbittman self-assigned this Oct 15, 2022
@dbittman dbittman requested a review from gvnn3 as a code owner October 15, 2022 21:05
Copy link
Contributor

@gvnn3 gvnn3 left a comment

Choose a reason for hiding this comment

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

LGTM but please have @PandaZ3D look at the time TODO

@dbittman dbittman merged commit 66b8f27 into main Oct 16, 2022
@dbittman dbittman deleted the dbittman-impl-simple-sleep branch October 16, 2022 04:37
@dbittman
Copy link
Contributor Author

Yep, that TODO is tracked by #42

@PandaZ3D
Copy link
Contributor

I see the other note on time. I will add a separate issue for making the time types used in the kernel match up with the twizzler-abi.

@PandaZ3D
Copy link
Contributor

Issue is now tracked in #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kernel Internal kernel issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants