twizzler-operating-system / twizzler

The Twizzler Operating System
BSD 3-Clause "New" or "Revised" License
66 stars 13 forks source link

Implement simple sleep for thread_sync. #99

Closed dbittman closed 1 year ago

dbittman commented 1 year ago

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.

dbittman commented 1 year ago

Yep, that TODO is tracked by #42

PandaZ3D commented 1 year ago

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 commented 1 year ago

Issue is now tracked in #100