mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-12-24 11:48:42 -05:00
fix timeout accounting in the scheduler
This commit is contained in:
parent
5f56c74e6f
commit
1c647c76fe
@ -41,7 +41,7 @@ end
|
||||
function os.taskInfo(pid) -- number -- table -- returns info on process *pid* as a table with name and parent values
|
||||
pid = pid or os.pid()
|
||||
if not tTasks[pid] then return false end
|
||||
return {name=tTasks[pid].n,parent=tTasks[pid].P,cputime=tTasks[pid].t,iotime=tTasks[pid].T}
|
||||
return {name=tTasks[pid].n,parent=tTasks[pid].P,cputime=tTasks[pid].t,iotime=tTasks[pid].T,timeout=tTasks[pid].E}
|
||||
end
|
||||
function os.sched() -- the actual scheduler function
|
||||
os.sched = nil
|
||||
@ -60,7 +60,6 @@ function os.sched() -- the actual scheduler function
|
||||
tTasks[k] = nil
|
||||
end
|
||||
end
|
||||
sTimeout = nTimeout
|
||||
end
|
||||
end
|
||||
function os.setenv(k,v) -- set's the current process' environment variable *k* to *v*, which is passed to children
|
||||
@ -73,9 +72,6 @@ function os.getenv(k) -- gets a process' *k* environment variable
|
||||
return tTasks[cPid].e[k]
|
||||
end
|
||||
end
|
||||
function os.getTimeout()
|
||||
return tTasks[cPid].E
|
||||
end
|
||||
function os.setTimeout(n,pid)
|
||||
assert(type(n) == "number" and n >= 0)
|
||||
tTasks[pid or cPid].E = n
|
||||
|
Loading…
Reference in New Issue
Block a user