Commit 06b9ff06 authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
parent 4abc7681
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
    }