aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2022-01-04 13:25:12 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-02-09 07:54:16 +0000
commit87271de92c4a69cfe92656c16bbef467e60b8c3b (patch)
treea71de54a355bec67b9ce3a3df11a1a84a611b087
parent26a9c64d9df9d4e9ac543a5efeca375918fd1cc5 (diff)
downloadsrc-87271de92c4a69cfe92656c16bbef467e60b8c3b.tar.gz
src-87271de92c4a69cfe92656c16bbef467e60b8c3b.zip
Unstaticize {get,set}_fpcontext() on amd64
This will be used to fix Linux signal delivery. Discussed With: kib Sponsored By: EPSRC (cherry picked from commit 562bc0a943d1fad1a9b551557609d2941a851b4d)
-rw-r--r--sys/amd64/amd64/exec_machdep.c9
-rw-r--r--sys/amd64/include/md_var.h5
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/amd64/exec_machdep.c b/sys/amd64/amd64/exec_machdep.c
index 0c2bebaea8f3..233f222b49f1 100644
--- a/sys/amd64/amd64/exec_machdep.c
+++ b/sys/amd64/amd64/exec_machdep.c
@@ -95,11 +95,6 @@ __FBSDID("$FreeBSD$");
#include <machine/specialreg.h>
#include <machine/trap.h>
-static void get_fpcontext(struct thread *td, mcontext_t *mcp,
- char **xfpusave, size_t *xfpusave_len);
-static int set_fpcontext(struct thread *td, mcontext_t *mcp,
- char *xfpustate, size_t xfpustate_len);
-
/*
* Send an interrupt to process.
*
@@ -714,7 +709,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp)
return (0);
}
-static void
+void
get_fpcontext(struct thread *td, mcontext_t *mcp, char **xfpusave,
size_t *xfpusave_len)
{
@@ -735,7 +730,7 @@ get_fpcontext(struct thread *td, mcontext_t *mcp, char **xfpusave,
}
}
-static int
+int
set_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpustate,
size_t xfpustate_len)
{
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index c8610f495bfe..13dedac784d1 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -54,6 +54,7 @@ extern vm_paddr_t KERNend;
extern bool efi_boot;
+struct __mcontext;
struct savefpu;
struct sysentvec;
@@ -89,5 +90,9 @@ void set_top_of_stack_td(struct thread *td);
struct savefpu *get_pcb_user_save_td(struct thread *td);
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
void pci_early_quirks(void);
+void get_fpcontext(struct thread *td, struct __mcontext *mcp,
+ char **xfpusave, size_t *xfpusave_len);
+int set_fpcontext(struct thread *td, struct __mcontext *mcp,
+ char *xfpustate, size_t xfpustate_len);
#endif /* !_MACHINE_MD_VAR_H_ */