mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
Revert "scheduler: task.Data made 64bit to avoid overflow"
This reverts commit fd8938c634.
This commit is contained in:
@@ -13,7 +13,7 @@ type Task struct {
|
|||||||
Ptr unsafe.Pointer
|
Ptr unsafe.Pointer
|
||||||
|
|
||||||
// Data is a field which can be used for storing state information.
|
// Data is a field which can be used for storing state information.
|
||||||
Data uint64
|
Data uint
|
||||||
|
|
||||||
// state is the underlying running state of the task.
|
// state is the underlying running state of the task.
|
||||||
state state
|
state state
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ func addSleepTask(t *task.Task, duration timeUnit) {
|
|||||||
panic("runtime: addSleepTask: expected next task to be nil")
|
panic("runtime: addSleepTask: expected next task to be nil")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t.Data = uint64(duration)
|
t.Data = uint(duration) // TODO: longer durations
|
||||||
now := ticks()
|
now := ticks()
|
||||||
if sleepQueue == nil {
|
if sleepQueue == nil {
|
||||||
scheduleLog(" -> sleep new queue")
|
scheduleLog(" -> sleep new queue")
|
||||||
|
|||||||
Reference in New Issue
Block a user