From e47261ac1601233eaff2d538f48035978811465a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 28 Sep 2018 16:04:47 +0200 Subject: simd: return a bool from simd_relax Suggested-by: Ard Biesheuvel Signed-off-by: Jason A. Donenfeld --- src/compat/simd/include/linux/simd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compat') diff --git a/src/compat/simd/include/linux/simd.h b/src/compat/simd/include/linux/simd.h index 863a665..8fd077b 100644 --- a/src/compat/simd/include/linux/simd.h +++ b/src/compat/simd/include/linux/simd.h @@ -49,14 +49,16 @@ static inline void simd_put(simd_context_t *ctx) *ctx = HAVE_NO_SIMD; } -static inline void simd_relax(simd_context_t *ctx) +static inline bool simd_relax(simd_context_t *ctx) { #ifdef CONFIG_PREEMPT if ((*ctx & HAVE_SIMD_IN_USE) && need_resched()) { simd_put(ctx); simd_get(ctx); + return true; } #endif + return false; } static __must_check inline bool simd_use(simd_context_t *ctx) -- cgit v1.2.3