Kaynağa Gözat

commented some scheduler functions

pull/1/head
XeonSquared 4 yıl önce
ebeveyn
işleme
b370a90618
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. +3
    -3
      module/sched.lua

+ 3
- 3
module/sched.lua Dosyayı Görüntüle

@@ -19,17 +19,17 @@ end
function os.kill(pid) -- removes process *pid* from the task list
tTasks[pid] = nil
end
function os.pid()
function os.pid() -- returns the current process' PID
return cPid
end
function os.tasks()
function os.tasks() -- returns a table of process IDs
local rt = {}
for k,v in pairs(tTasks) do
rt[#rt+1] = k
end
return rt
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()
if not tTasks[pid] then return false end
return {name=tTasks[pid].n,parent=tTasks[pid].P}


Yükleniyor…
İptal
Kaydet