Skip to content

Commit 9f93a8a

Browse files
wangbaolin719herbertx
authored andcommitted
crypto: api - Introduce crypto_queue_len() helper function
This patch introduces crypto_queue_len() helper function to help to get the queue length in the crypto queue list now. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent cc831d3 commit 9f93a8a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/crypto/algapi.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ int crypto_enqueue_request(struct crypto_queue *queue,
184184
struct crypto_async_request *request);
185185
struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue);
186186
int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm);
187+
static inline unsigned int crypto_queue_len(struct crypto_queue *queue)
188+
{
189+
return queue->qlen;
190+
}
187191

188192
/* These functions require the input/output to be aligned as u32. */
189193
void crypto_inc(u8 *a, unsigned int size);

0 commit comments

Comments
 (0)