1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Renamed poorly named setregs to exec_setregs. Moved its prototype to

imgact.h with the other exec support functions.
This commit is contained in:
Jake Burkholder 2002-08-29 06:17:48 +00:00
parent 409017e8e1
commit bafbd49201
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102561
17 changed files with 22 additions and 18 deletions

View File

@ -97,6 +97,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/imgact.h>
#include <sys/sysproto.h>
#include <sys/ktr.h>
#include <sys/signalvar.h>
@ -131,7 +132,6 @@
#include <sys/ucontext.h>
#include <machine/clock.h>
#include <machine/md_var.h>
#include <machine/reg.h>
#include <machine/fpu.h>
#include <machine/pal.h>
#include <machine/cpuconf.h>
@ -1583,7 +1583,7 @@ cpu_halt(void)
* Clear registers on exec
*/
void
setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tfp = td->td_frame;

View File

@ -114,7 +114,6 @@ void savefpstate(struct fpreg *);
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@ -822,7 +823,7 @@ cpu_idle(void)
* Clear registers on exec
*/
void
setregs(td, entry, stack, ps_strings)
exec_setregs(td, entry, stack, ps_strings)
struct thread *td;
u_long entry;
u_long stack;

View File

@ -143,7 +143,6 @@ struct dbreg {
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@ -822,7 +823,7 @@ cpu_idle(void)
* Clear registers on exec
*/
void
setregs(td, entry, stack, ps_strings)
exec_setregs(td, entry, stack, ps_strings)
struct thread *td;
u_long entry;
u_long stack;

View File

@ -143,7 +143,6 @@ struct dbreg {
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -41,6 +41,7 @@
#include <sys/eventhandler.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/lock.h>
@ -1095,7 +1096,7 @@ cpu_halt(void)
* Clear registers on exec
*/
void
setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *frame;

View File

@ -77,7 +77,6 @@ void savehighfp(struct ia64_fpreg *);
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -519,8 +519,8 @@ execve(td, uap)
(*p->p_sysent->sv_setregs)(td, imgp->entry_addr,
(u_long)(uintptr_t)stack_base, imgp->ps_strings);
else
setregs(td, imgp->entry_addr, (u_long)(uintptr_t)stack_base,
imgp->ps_strings);
exec_setregs(td, imgp->entry_addr,
(u_long)(uintptr_t)stack_base, imgp->ps_strings);
/* Cache arguments if they fit inside our allowance */
if (ps_arg_cache_limit >= i + sizeof(struct pargs)) {

View File

@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@ -842,7 +843,7 @@ cpu_idle(void)
* Clear registers on exec
*/
void
setregs(td, entry, stack, ps_strings)
exec_setregs(td, entry, stack, ps_strings)
struct thread *td;
u_long entry;
u_long stack;

View File

@ -55,6 +55,7 @@
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@ -842,7 +843,7 @@ cpu_idle(void)
* Clear registers on exec
*/
void
setregs(td, entry, stack, ps_strings)
exec_setregs(td, entry, stack, ps_strings)
struct thread *td;
u_long entry;
u_long stack;

View File

@ -66,6 +66,7 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/imgact.h>
#include <sys/sysproto.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@ -841,7 +842,7 @@ cpu_halt(void)
* Set set up registers on exec.
*/
void
setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tf;
struct ps_strings arginfo;

View File

@ -26,7 +26,6 @@ struct dbreg {
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -66,6 +66,7 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/imgact.h>
#include <sys/sysproto.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@ -841,7 +842,7 @@ cpu_halt(void)
* Set set up registers on exec.
*/
void
setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tf;
struct ps_strings arginfo;

View File

@ -74,7 +74,6 @@ struct dbreg {
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
void setregs(struct thread *, u_long, u_long, u_long);
int fill_regs(struct thread *, struct reg *);
int set_regs(struct thread *, struct reg *);
int fill_fpregs(struct thread *, struct fpreg *);

View File

@ -46,6 +46,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cons.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/linker.h>
@ -600,7 +601,7 @@ ptrace_single_step(struct thread *td)
}
void
setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tf;
struct md_utrap *ut;

View File

@ -38,6 +38,7 @@
#define MAXSHELLCMDLEN 128
struct thread;
struct vm_object;
struct image_params {
@ -69,6 +70,7 @@ int exec_check_permissions(struct image_params *);
int exec_extract_strings(struct image_params *);
int exec_new_vmspace(struct image_params *, vm_offset_t, vm_offset_t,
vm_offset_t);
void exec_setregs(struct thread *, u_long, u_long, u_long);
int exec_shell_imgact(struct image_params *);
#endif