summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/gen/getcontextx.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/i386/gen/getcontextx.c')
-rw-r--r--lib/libc/i386/gen/getcontextx.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/libc/i386/gen/getcontextx.c b/lib/libc/i386/gen/getcontextx.c
index 2d3b562..3c6dd33 100644
--- a/lib/libc/i386/gen/getcontextx.c
+++ b/lib/libc/i386/gen/getcontextx.c
@@ -89,14 +89,12 @@ __getcontextx_size(void)
}
int
-__fillcontextx(char *ctx)
+__fillcontextx2(char *ctx)
{
struct i386_get_xfpustate xfpu;
ucontext_t *ucp;
ucp = (ucontext_t *)ctx;
- if (getcontext(ucp) == -1)
- return (-1);
if (xstate_sz != 0) {
xfpu.addr = (char *)(ucp + 1);
xfpu.len = xstate_sz;
@@ -112,6 +110,18 @@ __fillcontextx(char *ctx)
return (0);
}
+int
+__fillcontextx(char *ctx)
+{
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ if (getcontext(ucp) == -1)
+ return (-1);
+ __fillcontextx2(ctx);
+ return (0);
+}
+
__weak_reference(__getcontextx, getcontextx);
ucontext_t *
OpenPOWER on IntegriCloud