changeset 235:05e61405cc88

fix worker compile error
author mir3636
date Mon, 23 Jan 2017 17:49:36 +0900
parents 47588c28f189
children 865179a0a56d
files src/parallel_execution/taskManager.c src/parallel_execution/worker.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/taskManager.c	Sun Jan 22 20:17:11 2017 +0900
+++ b/src/parallel_execution/taskManager.c	Mon Jan 23 17:49:36 2017 +0900
@@ -15,7 +15,7 @@
     // numIO+numGPU...numIO+numGPU+numCPU-1 CPUProcessor
     taskManager->io = 0;
     taskManager->gpu = numIO;
-    taskManeger->cpu = numIO+numGPU;
+    taskManager->cpu = numIO+numGPU;
     taskManager->createTask = C_createTask;
     taskManager->spawn = C_spawnTaskManager;
     taskManager->shutdown  = C_shutdownTaskManager;
--- a/src/parallel_execution/worker.c	Sun Jan 22 20:17:11 2017 +0900
+++ b/src/parallel_execution/worker.c	Mon Jan 23 17:49:36 2017 +0900
@@ -3,7 +3,7 @@
 #include "context.h"
 #include "origin_cs.h"
 
-static void start_code(Worker* worker);
+static void start_worker(Worker* worker);
 
 union Data* createCPUWorker(struct Context* context, int id, Queue* queue, enum Code next) {
     struct Worker* worker = ALLOC(context, Worker);
@@ -15,15 +15,15 @@
     cpuWorker->next = next;
     worker->taskReceive = C_taskReceiveWorker;
     worker->shutdown = C_shutdownWorker;
-    pthread_create(&worker->thread, NULL, (void*)&start_code, worker);
+    pthread_create(&worker->worker->CPUWorker.thread, NULL, (void*)&start_worker, worker);
     return (union Data*)(worker);
 }
 
-static void start_code(Worker* worker) {
-    CPUWorker* worker = (CPUWorker*)worker->worker;
-    worker->context = NEW(struct Context);
-    initContext(worker->context);
-    goto meta(worker->context, C_taskReceiveWorker);
+static void start_worker(Worker* worker) {
+    CPUWorker* cpuWorker = (CPUWorker*)worker->worker;
+    cpuWorker->context = NEW(struct Context);
+    initContext(cpuWorker->context);
+    goto meta(cpuWorker->context, C_taskReceiveWorker);
 }
 
 __code taskReceiveWorker(struct Context* context, CPUWorker* worker) {