diff options
Diffstat (limited to 'concurrency.c')
-rw-r--r-- | concurrency.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/concurrency.c b/concurrency.c index f35f329..28cea35 100644 --- a/concurrency.c +++ b/concurrency.c @@ -244,19 +244,19 @@ newthreaddata(Array *name) } Array * -runningtasks(void) +runningthreads(void) { lock(&threadlock); - Array *tasks = allocarray(AtypeInt, 1, nthreads); - tasks->shape[0] = nthreads; + Array *t = allocarray(AtypeInt, 1, nthreads); + t->shape[0] = nthreads; for(int i = 0; i < nthreads; i++) - tasks->intdata[i] = threads[i]->id; + t->intdata[i] = threads[i]->id; unlock(&threadlock); - return tasks; + return t; } Array * -taskproperty(vlong t, vlong p) +threadproperty(vlong t, vlong p) { ThreadData *td = nil; Array *res = nil; @@ -290,7 +290,7 @@ taskproperty(vlong t, vlong p) break; default: unlock(&threadlock); - throwerror(L"Invalid task property", EDomain); + throwerror(L"Invalid thread property", EDomain); break; } |