mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'm
at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
This commit is contained in:
parent
cfa35456ca
commit
e4dc8baa84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124296
@ -38,8 +38,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ieeefp.h>
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
struct params {
|
||||
u_int64_t mask;
|
||||
};
|
||||
@ -49,6 +47,6 @@ fpgetmask()
|
||||
{
|
||||
struct params p;
|
||||
|
||||
sysarch(ALPHA_GET_FPMASK, (char *) &p);
|
||||
sysarch(ALPHA_GET_FPMASK, &p);
|
||||
return((fp_except_t) p.mask);
|
||||
}
|
||||
|
@ -49,6 +49,6 @@ fpsetmask(mask)
|
||||
struct params p;
|
||||
|
||||
p.mask = (u_int64_t) mask;
|
||||
sysarch(ALPHA_SET_FPMASK, (char *) &p);
|
||||
sysarch(ALPHA_SET_FPMASK, &p);
|
||||
return ((fp_except_t) p.mask);
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
amd64_get_fsbase(void **addr)
|
||||
{
|
||||
|
||||
return (sysarch(AMD64_GET_FSBASE, (char *)addr));
|
||||
return (sysarch(AMD64_GET_FSBASE, addr));
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
amd64_get_gsbase(void **addr)
|
||||
{
|
||||
|
||||
return (sysarch(AMD64_GET_GSBASE, (char *)addr));
|
||||
return (sysarch(AMD64_GET_GSBASE, addr));
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
amd64_set_fsbase(void *addr)
|
||||
{
|
||||
|
||||
return (sysarch(AMD64_SET_FSBASE, (char *)&addr));
|
||||
return (sysarch(AMD64_SET_FSBASE, &addr));
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
amd64_set_gsbase(void *addr)
|
||||
{
|
||||
|
||||
return (sysarch(AMD64_SET_GSBASE, (char *)&addr));
|
||||
return (sysarch(AMD64_SET_GSBASE, &addr));
|
||||
}
|
||||
|
@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_get_ioperm(unsigned int start, unsigned int *length, int *enable)
|
||||
{
|
||||
@ -41,7 +39,7 @@ i386_get_ioperm(unsigned int start, unsigned int *length, int *enable)
|
||||
p.length = *length;
|
||||
p.enable = *enable;
|
||||
|
||||
error = sysarch(I386_GET_IOPERM, (char *)&p);
|
||||
error = sysarch(I386_GET_IOPERM, &p);
|
||||
|
||||
*length = p.length;
|
||||
*enable = p.enable;
|
||||
|
@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/segments.h>
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_get_ldt(int start, union descriptor *descs, int num)
|
||||
{
|
||||
@ -44,5 +42,5 @@ i386_get_ldt(int start, union descriptor *descs, int num)
|
||||
p.descs = descs;
|
||||
p.num = num;
|
||||
|
||||
return sysarch(I386_GET_LDT, (char *)&p);
|
||||
return sysarch(I386_GET_LDT, &p);
|
||||
}
|
||||
|
@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_set_ioperm(unsigned int start, unsigned int length, int enable)
|
||||
{
|
||||
@ -40,5 +38,5 @@ i386_set_ioperm(unsigned int start, unsigned int length, int enable)
|
||||
p.length = length;
|
||||
p.enable = enable;
|
||||
|
||||
return (sysarch(I386_SET_IOPERM, (char *)&p));
|
||||
return (sysarch(I386_SET_IOPERM, &p));
|
||||
}
|
||||
|
@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/segments.h>
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_set_ldt(int start, union descriptor *descs, int num)
|
||||
{
|
||||
@ -44,5 +42,5 @@ i386_set_ldt(int start, union descriptor *descs, int num)
|
||||
p.descs = descs;
|
||||
p.num = num;
|
||||
|
||||
return sysarch(I386_SET_LDT, (char *)&p);
|
||||
return sysarch(I386_SET_LDT, &p);
|
||||
}
|
||||
|
@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_vm86(int fcn, void *data)
|
||||
{
|
||||
@ -39,5 +37,5 @@ i386_vm86(int fcn, void *data)
|
||||
p.sub_op = fcn;
|
||||
p.sub_args = (char *)data;
|
||||
|
||||
return (sysarch(I386_VM86, (void *)&p));
|
||||
return (sysarch(I386_VM86, &p));
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdlib.h>
|
||||
|
||||
extern char __sigtramp[];
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
static const struct sparc_sigtramp_install_args sia = { __sigtramp, NULL };
|
||||
|
||||
@ -43,5 +42,5 @@ void
|
||||
__sparc_sigtramp_setup(void)
|
||||
{
|
||||
|
||||
sysarch(SPARC_SIGTRAMP_INSTALL, (char *)&sia);
|
||||
sysarch(SPARC_SIGTRAMP_INSTALL, &sia);
|
||||
}
|
||||
|
@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/utrap.h>
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
__sparc_utrap_install(utrap_entry_t type, utrap_handler_t new_precise,
|
||||
utrap_handler_t new_deferred, utrap_handler_t *old_precise,
|
||||
@ -47,5 +45,5 @@ __sparc_utrap_install(utrap_entry_t type, utrap_handler_t new_precise,
|
||||
ua[0].old_deferred = old_deferred;
|
||||
uia.num = 1;
|
||||
uia.handlers = ua;
|
||||
return (sysarch(SPARC_UTRAP_INSTALL, (char *)&uia));
|
||||
return (sysarch(SPARC_UTRAP_INSTALL, &uia));
|
||||
}
|
||||
|
@ -36,8 +36,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include "__sparc_utrap_private.h"
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
static const struct sparc_utrap_args ua[] = {
|
||||
{ UT_FP_DISABLED, __sparc_utrap_fp_disabled, NULL, NULL, NULL },
|
||||
{ UT_FP_EXCEPTION_IEEE_754, __sparc_utrap_gen, NULL, NULL, NULL },
|
||||
@ -56,5 +54,5 @@ void
|
||||
__sparc_utrap_setup(void)
|
||||
{
|
||||
|
||||
sysarch(SPARC_UTRAP_INSTALL, (char *)&uia);
|
||||
sysarch(SPARC_UTRAP_INSTALL, &uia);
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ union descriptor;
|
||||
|
||||
__BEGIN_DECLS
|
||||
int alpha_sethae(u_int64_t);
|
||||
int sysarch(int, void *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
@ -50,9 +50,10 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
int amd64_get_fsbase(void **);
|
||||
int amd64_set_fsbase(void *);
|
||||
int amd64_get_gsbase(void **);
|
||||
int amd64_set_fsbase(void *);
|
||||
int amd64_set_gsbase(void *);
|
||||
int sysarch(int, void *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
@ -79,6 +79,7 @@ int i386_set_ioperm(unsigned int, unsigned int, int);
|
||||
int i386_vm86(int, void *);
|
||||
int i386_set_watch(int, unsigned int, int, int, struct dbreg *);
|
||||
int i386_clr_watch(int, struct dbreg *);
|
||||
int sysarch(int, void *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
@ -45,6 +45,7 @@ struct ia64_iodesc {
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int sysarch(int, void *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
@ -69,6 +69,7 @@ int __sparc_utrap_install(utrap_entry_t type, utrap_handler_t new_precise,
|
||||
utrap_handler_t new_deferred,
|
||||
utrap_handler_t *old_precise,
|
||||
utrap_handler_t *old_deferred);
|
||||
int sysarch(int, void *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user