diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-09 15:55:01 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-20 23:35:19 +0000 |
commit | 06b9ff06cc7fdd8f51abb92aaac39d3988a7090e (patch) | |
tree | e6e6148b11b7cb7e6a4fcf72778e1943d9099455 /crypto | |
parent | 4abc76811a74b45c8bab1bbe3add4b58b374a04b (diff) | |
download | openssl-06b9ff06cc7fdd8f51abb92aaac39d3988a7090e.tar.gz |
Swap to using _longjmp/_setjmp instead of longjmp/setjmp
_longjmp/_setjmp do not manipulate the signal mask whilst
longjmp/setjmp may do. Online sources suggest this could result
in a significant speed up in the context switching.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/async/arch/async_posix.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h index 650d918ed4..0e6a0a0662 100644 --- a/crypto/async/arch/async_posix.h +++ b/crypto/async/arch/async_posix.h @@ -80,9 +80,9 @@ static inline int async_fibre_swapcontext(async_fibre *o, async_fibre *n, int r) { o->env_init = 1; - if (!r || !setjmp(o->env)) { + if (!r || !_setjmp(o->env)) { if (n->env_init) - longjmp(n->env, 1); + _longjmp(n->env, 1); else setcontext(&n->fibre); } |