Commit 3703ebc7 authored by Maciej Szwed's avatar Maciej Szwed Committed by Tomasz Zawadzki
Browse files

doc: Add information about shutdown_cb



Fixes GH 1539

Signed-off-by: default avatarMaciej Szwed <maciej.szwed@intel.com>
Change-Id: I5256a53c619b13951382fcc0439a157aa29b61aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7859


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 5cc56599
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -73,3 +73,11 @@ spdk_app_start() is called, it will block the current thread until the applicati
terminates by calling spdk_app_stop() or an error condition occurs during the
initialization code within spdk_app_start(), itself, before invoking the caller's
supplied function.

## Custom shutdown callback {#event_component_shutdown}

When creating SPDK based application user may add custom shutdown callback which
will be called before the application framework starts the shutdown process.
To do that set shutdown_cb function callback in spdk_app_opts structure passed
to spdk_app_start(). Custom shutdown callback should call spdk_app_stop() before
returning to continue application shutdown process.