Consolidate copyright for demos
[openssl.git] / doc / crypto / ASYNC_start_job.pod
index 81fdc97df47ac07aedb1776588ff1b1cd90733c8..5501f76cc8af9dda472e668ad8f3361c6d2fb465 100644 (file)
@@ -4,8 +4,8 @@
 
 ASYNC_init_thread, ASYNC_cleanup_thread, ASYNC_start_job, ASYNC_pause_job,
 ASYNC_in_job, ASYNC_get_wait_fd, ASYNC_set_wait_fd, ASYNC_clear_wait_fd,
-ASYNC_get_current_job, ASYNC_block_pause, ASYNC_unblock_pause - asynchronous job
-management functions
+ASYNC_get_current_job, ASYNC_block_pause, ASYNC_unblock_pause, ASYNC_is_capable
+- asynchronous job management functions
 
 =head1 SYNOPSIS
 
@@ -23,6 +23,8 @@ management functions
  void ASYNC_block_pause(void);
  void ASYNC_unblock_pause(void);
 
+ int ASYNC_is_capable(void);
+
 =head1 DESCRIPTION
 
 OpenSSL implements asynchronous capabilities through an ASYNC_JOB. This
@@ -109,7 +111,7 @@ for the B<job>. ASYNC_WAIT_CTXs can have a "wait" file descriptor associated
 with them. Applications can wait for the file descriptor to be ready for "read"
 using a system function call such as select or poll (being ready for "read"
 indicates that the job should be resumed). If no file descriptor is made
-available then an application will have to priodically "poll" the job by
+available then an application will have to periodically "poll" the job by
 attempting to restart it to see if it is ready to continue.
 
 An example of typical usage might be an async capable engine. User code would
@@ -133,10 +135,13 @@ application acquires a lock. It then calls some cryptographic function which
 invokes ASYNC_pause_job(). This returns control back to the code that created
 the ASYNC_JOB. If that code then attempts to acquire the same lock before
 resuming the original job then a deadlock can occur. By calling
-ASYNC_block_pause() immediately after aquiring the lock and
+ASYNC_block_pause() immediately after acquiring the lock and
 ASYNC_unblock_pause() immediately before releasing it then this situation cannot
 occur.
 
+Some platforms cannot support async operations. The ASYNC_is_capable() function
+can be used to detect whether the current platform is async capable or not.
+
 =head1 RETURN VALUES
 
 ASYNC_init_thread returns 1 on success or 0 otherwise.
@@ -153,6 +158,9 @@ NULL if not within the context of a job.
 
 ASYNC_get_wait_ctx() returns a pointer to the ASYNC_WAIT_CTX for the job.
 
+ASYNC_is_capable() returns 1 if the current platform is async capable or 0
+otherwise.
+
 =head1 EXAMPLE
 
 The following example demonstrates how to use most of the core async APIs:
@@ -295,8 +303,9 @@ L<crypto(3)>, L<ERR_print_errors(3)>
 
 =head1 HISTORY
 
-ASYNC_init, ASYNC_init_thread, ASYNC_cleanup, ASYNC_cleanup_thread,
-ASYNC_start_job, ASYNC_pause_job, ASYNC_get_wait_fd, ASYNC_get_current_job,
-ASYNC_wake, ASYNC_clear_wake were first added to OpenSSL 1.1.0.
+ASYNC_init_thread, ASYNC_cleanup_thread,
+ASYNC_start_job, ASYNC_pause_job, ASYNC_get_current_job, ASYNC_get_wait_ctx(),
+ASYNC_block_pause(), ASYNC_unblock_pause() and ASYNC_is_capable() were first
+added to OpenSSL 1.1.0.
 
 =cut