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

@@ -78,6 +78,8 @@ int ASYNC_get_wait_fd(ASYNC_JOB *job);
ASYNC_JOB *ASYNC_get_current_job(void);
void ASYNC_wake(ASYNC_JOB *job);
void ASYNC_clear_wake(ASYNC_JOB *job);
void ASYNC_block_pause(void);
void ASYNC_unblock_pause(void);
/* BEGIN ERROR CODES */
/*