github.com/jspc/eggos@v0.5.1-0.20221028160421-556c75c878a5/kernel/init.go (about) 1 package kernel 2 3 import "github.com/jspc/eggos/drivers/clock" 4 5 // called when go runtime init done 6 func Init() { 7 clockTimeInit() 8 idleInit() 9 go runTrapThread() 10 go runSyscallThread() 11 bootstrapDone = true 12 } 13 14 func clockTimeInit() { 15 t := clock.ReadCmosTime() 16 baseUnixTime = t.Time().Unix() 17 clockBaseCounter = counter 18 }