git: 562bc0a943d1 - main - Unstaticize {get,set}_fpcontext() on amd64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Jan 2022 14:05:06 UTC
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=562bc0a943d1fad1a9b551557609d2941a851b4d
commit 562bc0a943d1fad1a9b551557609d2941a851b4d
Author: Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2022-01-04 13:25:12 +0000
Commit: Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2022-01-04 13:25:12 +0000
Unstaticize {get,set}_fpcontext() on amd64
This will be used to fix Linux signal delivery.
Discussed With: kib
Sponsored By: EPSRC
---
sys/amd64/amd64/exec_machdep.c | 9 ++-------
sys/amd64/include/md_var.h | 5 +++++
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 53139711bbff..53358600dc79 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;
@@ -88,5 +89,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_ */