Skip to content

Commit

Permalink
Unstaticize {get,set}_fpcontext() on amd64
Browse files Browse the repository at this point in the history
This will be used to fix Linux signal delivery.

Discussed With:	kib
Sponsored By:	EPSRC
  • Loading branch information
trasz committed Jan 4, 2022
1 parent 4885d6f commit 562bc0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sys/amd64/amd64/exec_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
5 changes: 5 additions & 0 deletions sys/amd64/include/md_var.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extern vm_paddr_t KERNend;

extern bool efi_boot;

struct __mcontext;
struct savefpu;
struct sysentvec;

Expand Down Expand Up @@ -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_ */

0 comments on commit 562bc0a

Please sign in to comment.