summaryrefslogtreecommitdiffhomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-28 16:04:47 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commite47261ac1601233eaff2d538f48035978811465a (patch)
treefa0341f52c775d6363521f06a04fdbdf2b947107 /src/compat
parenta8af31524ad8fb036b03a67823d8372e509b41d9 (diff)
simd: return a bool from simd_relax
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/simd/include/linux/simd.h4
1 files changed, 3 insertions, 1 deletions
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)