---
name: "ahash_request_set_callback"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/ahash_request_set_callback"
---

# ahash\_request\_set\_callback(9)

set asynchronous callback function

## NAME

ahash\_request\_set\_callback - set asynchronous callback function

## SYNOPSIS

**void ahash\_request\_set\_callback(struct ahash\_request \*** *req***, u32** *flags***, crypto\_completion\_t** *compl***, void \*** *data***);**

## ARGUMENTS

*req*

request handle

*flags*

specify zero or an ORing of the flags CRYPTO\_TFM\_REQ\_MAY\_BACKLOG the request queue may back log and increase the wait queue beyond the initial maximum size; CRYPTO\_TFM\_REQ\_MAY\_SLEEP the request processing may sleep

*compl*

callback function pointer to be registered with the request handle

*data*

The data pointer refers to memory that is not used by the kernel crypto API, but provided to the callback function for it to use. Here, the caller can provide a reference to memory the callback function can operate on. As the callback function is invoked asynchronously to the related functionality, it may need to access data structures of the related functionality which can be referenced using this pointer. The callback function can access the memory via the “data” field in the crypto\_async\_request data structure provided to the callback function.

## DESCRIPTION

This function allows setting the callback function that is triggered once the cipher operation completes.

The callback function is registered with the ahash\_request handle and must comply with the following template

void callback\_function(struct crypto\_async\_request \*req, int error)

## AUTHORS

**Stephan Mueller** \<smueller@chronox.de\>

Author.

**Marek Vasut** \<marek@denx.de\>

Author.

## COPYRIGHT
