scheduler: task.Data made 64bit to avoid overflow

This commit is contained in:
Kenneth Bell
2021-05-16 11:05:23 -07:00
committed by Ayke
parent c5ea1fde61
commit 2f248bbf8b
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ type Task struct {
Ptr unsafe.Pointer
// Data is a field which can be used for storing state information.
Data uint
Data uint64
// state is the underlying running state of the task.
state state
+1 -1
View File
@@ -88,7 +88,7 @@ func addSleepTask(t *task.Task, duration timeUnit) {
panic("runtime: addSleepTask: expected next task to be nil")
}
}
t.Data = uint(duration) // TODO: longer durations
t.Data = uint64(duration)
now := ticks()
if sleepQueue == nil {
scheduleLog(" -> sleep new queue")