From 2865a0378fe7e60b5ac9dcc43f6f99421c4bb068 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 23 Feb 2015 11:15:44 +1100 Subject: [PATCH] Keep track of per process ckwqs in the ckpool structure --- src/ckpool.h | 2 ++ src/stratifier.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ckpool.h b/src/ckpool.h index eaf166fd..a734258a 100644 --- a/src/ckpool.h +++ b/src/ckpool.h @@ -213,6 +213,8 @@ struct ckpool_instance { /* Private data for each process */ void *data; + /* Private generic workqueues if this process has them */ + ckwq_t *ckwqs; }; #ifdef USE_CKDB diff --git a/src/stratifier.c b/src/stratifier.c index 2956ad36..94c70c24 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4394,7 +4394,7 @@ int stratifier(proc_instance_t *pi) sdata->ssends = create_ckmsgq(ckp, "ssender", &ssend_process); /* Create as many generic workqueue threads as there are CPUs */ threads = sysconf(_SC_NPROCESSORS_ONLN); - sdata->ckwqs = create_ckwqs(ckp, "strat", threads); + ckp->ckwqs = sdata->ckwqs = create_ckwqs(ckp, "strat", threads); sdata->sauthq = create_ckmsgq(ckp, "authoriser", &sauth_process); if (!CKP_STANDALONE(ckp)) { sdata->ckdbq = create_ckmsgq(ckp, "ckdbqueue", &ckdbq_process);