sys/arm64: fix return values of freebsd32_{set,swap}context()

This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.

In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.

Tested by:	fuz
MFC after:	1 week
This commit is contained in:
Piotr Kubaj
2026-06-11 13:41:29 +02:00
committed by Robert Clausecker
parent 3260c42c41
commit 92ae21e8a1
+2 -2
View File
@@ -293,7 +293,7 @@ freebsd32_setcontext(struct thread *td, struct freebsd32_setcontext_args *uap)
NULL, 0);
}
}
return (ret);
return (ret == 0 ? EJUSTRETURN : ret);
}
int
@@ -341,7 +341,7 @@ freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args *uap)
}
}
}
return (ret);
return (ret == 0 ? EJUSTRETURN : ret);
}
void