aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/async/async_locl.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson2016-01-071-1/+1
| | | | | | | | | | Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Async error handling and MacOS/X fixesViktor Dukhovni2015-11-221-0/+9
| | | | | | | | | | | | | | | | | | | In the async code for MacOS/X define _XOPEN_SOURCE (if not already defined) as early as possible. We must do this before including any header files, because on MacOS/X <stlib.h> includes <signal.h> which includes <ucontext.h>. If we delay defining _XOPEN_SOURCE and include <ucontext.h> after various system headers are included, we are very likely to end up with the wrong (truncated) definition of ucontext_t. Also, better error handling and some code cleanup in POSIX fibre construction and destruction. We make sure that async_fibre_makecontext() always initializes the fibre to a state that can be freed. For all implementations, check for error returns from async_fibre_makecontext(). Reviewed-by: Matt Caswell <matt@openssl.org>
* Implement windows async thread local variable supportMatt Caswell2015-11-201-1/+4
| | | | | | | Implements Thread Local Storage in the windows async port. This also has some knock on effects to the posix and null implementations. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Convert __thread to pthreads for Thread Local StorageMatt Caswell2015-11-201-0/+1
| | | | | | | | | | | | In theory the pthreads approach for Thread Local Storage should be more portable. This also changes some APIs in order to accommodate this change. In particular ASYNC_init_pool is renamed ASYNC_init_thread and ASYNC_free_pool is renamed ASYNC_cleanup_thread. Also introduced ASYNC_init and ASYNC_cleanup. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Simplify async pool handlingMatt Caswell2015-11-201-8/+8
| | | | | | | | A lot of the pool handling code was in the arch specific files, but was actually boiler plate and the same across the implementations. This commit moves as much code as possible out of the arch specific files. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Swap to using proper windows pipesMatt Caswell2015-11-201-5/+5
| | | | | | | | | | We were using _pipe to create a pipe on windows. This uses the "int" type for its file descriptor for compatibility. However most windows functions expect to use a "HANDLE". Probably we could get away with just casting but it seems more robust to use the proper type and main stream windows functions. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add ASYNC_block_pause and ASYNC_unblock_pauseMatt Caswell2015-11-201-0/+1
| | | | | | | | | 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>
* Normalise ASYNC namingMatt Caswell2015-11-201-4/+4
| | | | | | Tidied up the naming of functions and structures to be consistent Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix windows compilation warningsMatt Caswell2015-11-201-0/+3
| | | | | | Fix some warnings in the async code when compiling on windows. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Implement windows async pool and notify supportMatt Caswell2015-11-201-2/+2
| | | | | | Port the async pool and notify code to windows. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Implement local thread poolsMatt Caswell2015-11-201-0/+11
| | | | | | | Implement the ASYNC_JOB as a local thread pool. Remove the API support for global pools. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Initial Async notify code changesMatt Caswell2015-11-201-0/+3
| | | | | | | | | | | | Initial API implemented for notifying applications that an ASYNC_JOB has completed. Currently only s_server is using this. The Dummy Async engine "cheats" in that it notifies that it has completed *before* it pauses the job. A normal async engine would not do that. Only the posix version of this has been implemented so far, so it will probably fail to compile on Windows at the moment. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add null async implementationMatt Caswell2015-11-201-4/+1
| | | | | | | Create a "null" async implementation for platforms that lack support. This just does nothing when called and therefore performs synchronously. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Async port to windowsMatt Caswell2015-11-201-0/+78
Reviewed-by: Rich Salz <rsalz@openssl.org>