Skip to content

Commit

Permalink
fix(corepool): fix multiple definition of csp_core_pools error #10
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyanhui committed Jan 20, 2021
1 parent e734bfb commit 5989ad3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/corepool.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ extern csp_core_t *csp_core_new(
extern void csp_core_destroy(csp_core_t *core);
static void csp_core_pool_destroy(csp_core_pool_t *pool);

csp_core_pools_t csp_core_pools;

static csp_core_pool_t *
csp_core_pool_new(int pid, size_t grunq_cap_exp, size_t cores_per_cpu) {
csp_core_pool_t *pool = (csp_core_pool_t *)calloc(1, sizeof(csp_core_pool_t));
Expand Down
7 changes: 6 additions & 1 deletion src/corepool.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ typedef struct {
csp_mutex_t mutex;
} csp_core_pool_t;

struct { size_t len; csp_core_pool_t **pools; } csp_core_pools;
typedef struct {
size_t len;
csp_core_pool_t **pools;
} csp_core_pools_t;

extern csp_core_pools_t csp_core_pools;

#ifdef __cplusplus
}
Expand Down

0 comments on commit 5989ad3

Please sign in to comment.