From bb55a4c100abbb8d2a41e732f6362c575a7094e6 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 26 May 2014 15:32:05 +0200 Subject: crypto: api - Move crypto_yield() to algapi.h It makes no sense for crypto_yield() to be defined in scatterwalk.h , move it into algapi.h as it's an internal function to crypto API. Signed-off-by: Marek Vasut Signed-off-by: Herbert Xu --- include/crypto/algapi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/crypto/algapi.h') diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 016c2f110f63..623a59c1ff5a 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -410,4 +410,10 @@ static inline int crypto_memneq(const void *a, const void *b, size_t size) return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; } +static inline void crypto_yield(u32 flags) +{ + if (flags & CRYPTO_TFM_REQ_MAY_SLEEP) + cond_resched(); +} + #endif /* _CRYPTO_ALGAPI_H */ -- cgit v1.2.3