Browse Source

fix timeout accounting in the scheduler

master
XeonSquared 5 months ago
parent
commit
1c647c76fe
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      module/sched.lua

+ 1
- 5
module/sched.lua View File

@@ -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…
Cancel
Save