aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/async
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-09 16:23:55 +0100
committerMatt Caswell <matt@openssl.org>2015-11-20 23:35:19 +0000
commitd7e404c27bba9384f346c28931c747bba880204a (patch)
treeee65f5e50c0a5485ae0b4051639ad99a00ec839a /crypto/async
parent06b9ff06cc7fdd8f51abb92aaac39d3988a7090e (diff)
downloadopenssl-d7e404c27bba9384f346c28931c747bba880204a.tar.gz
Fix clang errors
Make clang build without errors in the async code Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/async')
-rw-r--r--crypto/async/arch/async_posix.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c
index b01e69a5f5..814930f7bb 100644
--- a/crypto/async/arch/async_posix.c
+++ b/crypto/async/arch/async_posix.c
@@ -65,9 +65,12 @@ __thread async_ctx *sysvctx;
#define STACKSIZE 32768
-__thread size_t pool_max_size = 0;
-__thread size_t pool_curr_size = 0;
-__thread STACK_OF(ASYNC_JOB) *pool = NULL;
+extern __thread size_t posixpool_max_size;
+extern __thread size_t posixpool_curr_size;
+extern __thread STACK_OF(ASYNC_JOB) *posixpool;
+__thread size_t posixpool_max_size = 0;
+__thread size_t posixpool_curr_size = 0;
+__thread STACK_OF(ASYNC_JOB) *posixpool = NULL;
int async_fibre_init(async_fibre *fibre)
{
@@ -117,42 +120,43 @@ int async_read1(int fd, void *buf)
STACK_OF(ASYNC_JOB) *async_get_pool(void)
{
- return pool;
+ return posixpool;
}
int async_set_pool(STACK_OF(ASYNC_JOB) *poolin, size_t curr_size,
size_t max_size)
{
- pool = poolin;
- pool_curr_size = curr_size;
- pool_max_size = max_size;
+ posixpool = poolin;
+ posixpool_curr_size = curr_size;
+ posixpool_max_size = max_size;
return 1;
}
void async_increment_pool_size(void)
{
- pool_curr_size++;
+ posixpool_curr_size++;
}
void async_release_job_to_pool(ASYNC_JOB *job)
{
- sk_ASYNC_JOB_push(pool, job);
+ sk_ASYNC_JOB_push(posixpool, job);
}
size_t async_pool_max_size(void)
{
- return pool_max_size;
+ return posixpool_max_size;
}
void async_release_pool(void)
{
- sk_ASYNC_JOB_free(pool);
- pool = NULL;
+ sk_ASYNC_JOB_free(posixpool);
+ posixpool = NULL;
}
int async_pool_can_grow(void)
{
- return (pool_max_size == 0) || (pool_curr_size < pool_max_size);
+ return (posixpool_max_size == 0)
+ || (posixpool_curr_size < posixpool_max_size);
}
#endif