Add ASYNC_block_pause and ASYNC_unblock_pause

There are potential deadlock situations that can occur if code executing
within the context of a job aquires a lock, and then pauses the job. This
adds an ability to temporarily block pauses from occuring whilst performing
work and holding a lock.

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell
2015-11-12 10:42:08 +00:00
parent f4511d4897
commit e8dfb5bf8e
6 changed files with 87 additions and 7 deletions

View File

@@ -63,6 +63,7 @@ typedef struct async_ctx_st async_ctx;
struct async_ctx_st {
async_fibre dispatcher;
ASYNC_JOB *currjob;
unsigned int blocked;
};
struct async_job_st {