[Midnightbsd-cvs] src [7476] trunk/lib/libc: add missing references

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Mar 18 20:39:42 EDT 2016


Revision: 7476
          http://svnweb.midnightbsd.org/src/?rev=7476
Author:   laffer1
Date:     2016-03-18 20:39:41 -0400 (Fri, 18 Mar 2016)
Log Message:
-----------
add missing references

Modified Paths:
--------------
    trunk/lib/libc/amd64/gen/getcontextx.c
    trunk/lib/libc/i386/gen/getcontextx.c

Modified: trunk/lib/libc/amd64/gen/getcontextx.c
===================================================================
--- trunk/lib/libc/amd64/gen/getcontextx.c	2016-03-19 00:11:39 UTC (rev 7475)
+++ trunk/lib/libc/amd64/gen/getcontextx.c	2016-03-19 00:39:41 UTC (rev 7476)
@@ -57,14 +57,12 @@
 }
 
 int
-__fillcontextx(char *ctx)
+__fillcontextx2(char *ctx)
 {
 	struct amd64_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;
@@ -80,6 +78,18 @@
 	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 *

Modified: trunk/lib/libc/i386/gen/getcontextx.c
===================================================================
--- trunk/lib/libc/i386/gen/getcontextx.c	2016-03-19 00:11:39 UTC (rev 7475)
+++ trunk/lib/libc/i386/gen/getcontextx.c	2016-03-19 00:39:41 UTC (rev 7476)
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__MBSDID("$MidnightBSD$");
 
 #include <sys/types.h>
 #include <sys/ucontext.h>
@@ -89,14 +89,12 @@
 }
 
 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 @@
 	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 *



More information about the Midnightbsd-cvs mailing list