commented some scheduler functions

This commit is contained in:
Izaya 2019-12-16 14:30:27 +11:00
parent f80a58ce1d
commit b370a90618
1 changed files with 3 additions and 3 deletions

View File

@ -19,17 +19,17 @@ end
function os.kill(pid) -- removes process *pid* from the task list function os.kill(pid) -- removes process *pid* from the task list
tTasks[pid] = nil tTasks[pid] = nil
end end
function os.pid() function os.pid() -- returns the current process' PID
return cPid return cPid
end end
function os.tasks() function os.tasks() -- returns a table of process IDs
local rt = {} local rt = {}
for k,v in pairs(tTasks) do for k,v in pairs(tTasks) do
rt[#rt+1] = k rt[#rt+1] = k
end end
return rt return rt
end end
function os.taskInfo(pid) function os.taskInfo(pid) -- returns info on process *pid* as a table with name and parent values
pid = pid or os.pid() pid = pid or os.pid()
if not tTasks[pid] then return false end if not tTasks[pid] then return false end
return {name=tTasks[pid].n,parent=tTasks[pid].P} return {name=tTasks[pid].n,parent=tTasks[pid].P}