diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-28 16:04:47 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-02 03:41:49 +0200 |
commit | 290e95fc7a8702fe6c6cb414bf716f23139ddba4 (patch) | |
tree | 037b8e9b251c717284144c0832affd7c2d8880f4 /src/compat/simd/include/linux/simd.h | |
parent | global: prefix all functions with wg_ (diff) | |
download | wireguard-monolithic-historical-290e95fc7a8702fe6c6cb414bf716f23139ddba4.tar.xz wireguard-monolithic-historical-290e95fc7a8702fe6c6cb414bf716f23139ddba4.zip |
simd: return a bool from simd_relax
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to '')
-rw-r--r-- | src/compat/simd/include/linux/simd.h | 4 |
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) |