1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Remove register keyword from sys/ and ANSIfy prototypes

A long long time ago the register keyword told the compiler to store
the corresponding variable in a CPU register, but it is not relevant
for any compiler used in the FreeBSD world today.

ANSIfy related prototypes while here.

Reviewed by:	cem, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10193
This commit is contained in:
Ed Maste 2017-05-17 00:34:34 +00:00
parent 00f6cd3f56
commit 3e85b721d6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318389
72 changed files with 434 additions and 912 deletions

View File

@ -169,9 +169,7 @@ update_gdt_fsbase(struct thread *td, uint32_t base)
}
int
sysarch(td, uap)
struct thread *td;
register struct sysarch_args *uap;
sysarch(struct thread *td, struct sysarch_args *uap)
{
int error = 0;
struct pcb *pcb = curthread->td_pcb;

View File

@ -148,13 +148,9 @@ alloc_fpusave(int flags)
* ready to run and return to user mode.
*/
void
cpu_fork(td1, p2, td2, flags)
register struct thread *td1;
register struct proc *p2;
struct thread *td2;
int flags;
cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
{
register struct proc *p1;
struct proc *p1;
struct pcb *pcb2;
struct mdproc *mdp1, *mdp2;
struct proc_ldt *pldt;

View File

@ -188,9 +188,7 @@ arm32_get_tp(struct thread *td, void *args)
}
int
sysarch(td, uap)
struct thread *td;
register struct sysarch_args *uap;
sysarch(struct thread *td, struct sysarch_args *uap)
{
int error;

View File

@ -93,8 +93,7 @@ uint32_t initial_fpscr = VFPSCR_DN | VFPSCR_FZ;
* ready to run and return to user mode.
*/
void
cpu_fork(register struct thread *td1, register struct proc *p2,
struct thread *td2, int flags)
cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
{
struct pcb *pcb2;
struct trapframe *tf;

View File

@ -299,7 +299,7 @@ atomic_clear_32(volatile uint32_t *address, uint32_t clearmask)
static __inline u_int32_t
atomic_cmpset_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval)
{
register int done, ras_start = ARM_RAS_START;
int done, ras_start = ARM_RAS_START;
__asm __volatile("1:\n"
"adr %1, 1b\n"

View File

@ -69,14 +69,14 @@ extern const DES_LONG des_SPtrans[8][64];
void des_encrypt1(DES_LONG *data, des_key_schedule ks, int enc)
{
register DES_LONG l,r,t,u;
DES_LONG l,r,t,u;
#ifdef DES_PTR
register const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
#endif
#ifndef DES_UNROLL
register int i;
int i;
#endif
register DES_LONG *s;
DES_LONG *s;
r=data[0];
l=data[1];
@ -167,14 +167,14 @@ void des_encrypt1(DES_LONG *data, des_key_schedule ks, int enc)
void des_encrypt2(DES_LONG *data, des_key_schedule ks, int enc)
{
register DES_LONG l,r,t,u;
DES_LONG l,r,t,u;
#ifdef DES_PTR
register const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
const unsigned char *des_SP=(const unsigned char *)des_SPtrans;
#endif
#ifndef DES_UNROLL
register int i;
int i;
#endif
register DES_LONG *s;
DES_LONG *s;
r=data[0];
l=data[1];
@ -259,7 +259,7 @@ void des_encrypt2(DES_LONG *data, des_key_schedule ks, int enc)
void des_encrypt3(DES_LONG *data, des_key_schedule ks1, des_key_schedule ks2,
des_key_schedule ks3)
{
register DES_LONG l,r;
DES_LONG l,r;
l=data[0];
r=data[1];
@ -279,7 +279,7 @@ void des_encrypt3(DES_LONG *data, des_key_schedule ks1, des_key_schedule ks2,
void des_decrypt3(DES_LONG *data, des_key_schedule ks1, des_key_schedule ks2,
des_key_schedule ks3)
{
register DES_LONG l,r;
DES_LONG l,r;
l=data[0];
r=data[1];

View File

@ -172,10 +172,10 @@ int des_set_key_checked(des_cblock *key, des_key_schedule schedule)
void des_set_key_unchecked(des_cblock *key, des_key_schedule schedule)
{
static int shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
register DES_LONG c,d,t,s,t2;
register const unsigned char *in;
register DES_LONG *k;
register int i;
DES_LONG c,d,t,s,t2;
const unsigned char *in;
DES_LONG *k;
int i;
k = &schedule->ks.deslong[0];
in = &(*key)[0];

View File

@ -57,8 +57,8 @@ db_expr_t
db_get_value(db_addr_t addr, int size, bool is_signed)
{
char data[sizeof(u_int64_t)];
register db_expr_t value;
register int i;
db_expr_t value;
int i;
if (db_read_bytes(addr, size, data) != 0) {
db_printf("*** error reading from address %llx ***\n",
@ -87,7 +87,7 @@ void
db_put_value(db_addr_t addr, int size, db_expr_t value)
{
char data[sizeof(int)];
register int i;
int i;
#if BYTE_MSF
for (i = size - 1; i >= 0; i--)

View File

@ -92,7 +92,7 @@ static void db_pager(void);
void
db_force_whitespace(void)
{
register int last_print, next_tab;
int last_print, next_tab;
last_print = db_last_non_space;
while (last_print < db_output_position) {
@ -355,7 +355,7 @@ db_iprintf(const char *fmt,...)
char bufr[DDB_BUFR_SIZE];
#endif
struct dbputchar_arg dca;
register int i;
int i;
va_list listp;
for (i = db_indent; i >= 8; i -= 8)

View File

@ -286,10 +286,10 @@ static c_db_sym_t
db_lookup(const char *symstr)
{
c_db_sym_t sp;
register int i;
int i;
int symtab_start = 0;
int symtab_end = db_nsymtab;
register const char *cp;
const char *cp;
/*
* Look for, remove, and remember any symbol table specifier.
@ -343,8 +343,8 @@ static bool
db_symbol_is_ambiguous(c_db_sym_t sym)
{
const char *sym_name;
register int i;
register bool found_once = false;
int i;
bool found_once = false;
if (!db_qualify_ambiguous_names)
return (false);
@ -367,10 +367,9 @@ db_symbol_is_ambiguous(c_db_sym_t sym)
c_db_sym_t
db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp)
{
register
unsigned int diff;
size_t newdiff;
register int i;
int i;
c_db_sym_t ret = C_DB_SYM_NULL, sym;
newdiff = diff = val;

View File

@ -1038,7 +1038,7 @@ cs_setmode(struct cs_softc *sc)
}
static int
cs_ioctl(register struct ifnet *ifp, u_long command, caddr_t data)
cs_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct cs_softc *sc=ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;

View File

@ -1777,7 +1777,7 @@ static int
ixgb_get_buf(int i, struct adapter * adapter,
struct mbuf * nmp)
{
struct mbuf *mp = nmp;
struct mbuf *mp = nmp;
struct ixgb_buffer *rx_buffer;
struct ifnet *ifp;
bus_addr_t paddr;

View File

@ -216,7 +216,7 @@ lge_eeprom_getword(sc, addr, dest)
int addr;
u_int16_t *dest;
{
register int i;
int i;
u_int32_t val;
CSR_WRITE_4(sc, LGE_EECTL, LGE_EECTL_CMD_READ|
@ -413,7 +413,7 @@ static void
lge_reset(sc)
struct lge_softc *sc;
{
register int i;
int i;
LGE_SETBIT(sc, LGE_MODE1, LGE_MODE1_SETRST_CTL0|LGE_MODE1_SOFTRST);
@ -756,7 +756,7 @@ lge_alloc_jumbo_mem(sc)
struct lge_softc *sc;
{
caddr_t ptr;
register int i;
int i;
struct lge_jpool_entry *entry;
/* Grab a big chunk o' storage. */
@ -1524,7 +1524,7 @@ static void
lge_stop(sc)
struct lge_softc *sc;
{
register int i;
int i;
struct ifnet *ifp;
LGE_LOCK_ASSERT(sc);

View File

@ -309,7 +309,7 @@ mse_disablelogi(struct resource *port)
static void
mse_getlogi(struct resource *port, int *dx, int *dy, int *but)
{
register char x, y;
char x, y;
bus_write_1(port, MSE_PORTC, MSE_HOLD | MSE_RXLOW);
x = bus_read_1(port, MSE_PORTA);

View File

@ -751,7 +751,7 @@ my_setcfg(struct my_softc * sc, int bmcr)
static void
my_reset(struct my_softc * sc)
{
register int i;
int i;
MY_LOCK_ASSERT(sc);
MY_SETBIT(sc, MY_BCR, MY_SWR);
@ -1717,7 +1717,7 @@ my_watchdog(void *arg)
static void
my_stop(struct my_softc * sc)
{
register int i;
int i;
struct ifnet *ifp;
MY_LOCK_ASSERT(sc);

View File

@ -1453,7 +1453,7 @@ pcn_watchdog(struct pcn_softc *sc)
static void
pcn_stop(struct pcn_softc *sc)
{
register int i;
int i;
struct ifnet *ifp;
PCN_LOCK_ASSERT(sc);

View File

@ -674,10 +674,10 @@ imm_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
int *ret)
{
device_t ppbus = device_get_parent(vpo->vpo_dev);
register char r;
char r;
char l, h = 0;
int len, error = 0, not_connected = 0;
register int k;
int k;
int negociated = 0;
/*

View File

@ -680,10 +680,10 @@ vpoio_do_scsi(struct vpoio_data *vpo, int host, int target, char *command,
int *ret)
{
device_t ppbus = device_get_parent(vpo->vpo_dev);
register char r;
char r;
char l, h = 0;
int len, error = 0;
register int k;
int k;
/*
* enter disk state, allocate the ppbus

View File

@ -285,7 +285,7 @@ ppc_detect_port(struct ppc_data *ppc)
static void
ppc_reset_epp_timeout(struct ppc_data *ppc)
{
register char r;
char r;
r = r_str(ppc);
w_str(ppc, r | 0x1);
@ -1321,10 +1321,10 @@ ppc_exec_microseq(device_t dev, struct ppb_microseq **p_msq)
int i, iter, len;
int error;
register int reg;
register char mask;
register int accum = 0;
register char *ptr = NULL;
int reg;
char mask;
int accum = 0;
char *ptr = NULL;
struct ppb_microseq *stack = NULL;

View File

@ -1401,7 +1401,7 @@ int
qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp,
uint32_t jumbo)
{
register struct mbuf *mp = nmp;
struct mbuf *mp = nmp;
struct ifnet *ifp;
int ret = 0;
uint32_t offset;

View File

@ -1797,7 +1797,7 @@ qla_free_rcv_bufs(qla_host_t *ha)
int
ql_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
{
register struct mbuf *mp = nmp;
struct mbuf *mp = nmp;
struct ifnet *ifp;
int ret = 0;
uint32_t offset;

View File

@ -1396,7 +1396,7 @@ qls_alloc_rcv_bufs(qla_host_t *ha)
int
qls_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp)
{
register struct mbuf *mp = nmp;
struct mbuf *mp = nmp;
struct ifnet *ifp;
int ret = 0;
uint32_t offset;

View File

@ -276,7 +276,7 @@ DRIVER_MODULE(miibus, rl, miibus_driver, miibus_devclass, 0, 0);
static void
rl_eeprom_putbyte(struct rl_softc *sc, int addr)
{
register int d, i;
int d, i;
d = addr | sc->rl_eecmd_read;
@ -303,7 +303,7 @@ rl_eeprom_putbyte(struct rl_softc *sc, int addr)
static void
rl_eeprom_getword(struct rl_softc *sc, int addr, uint16_t *dest)
{
register int i;
int i;
uint16_t word = 0;
/* Enter EEPROM access mode. */
@ -561,7 +561,7 @@ rl_rxfilter(struct rl_softc *sc)
static void
rl_reset(struct rl_softc *sc)
{
register int i;
int i;
RL_LOCK_ASSERT(sc);
@ -1912,7 +1912,7 @@ rl_watchdog(struct rl_softc *sc)
static void
rl_stop(struct rl_softc *sc)
{
register int i;
int i;
struct ifnet *ifp = sc->rl_ifp;
RL_LOCK_ASSERT(sc);

View File

@ -394,7 +394,7 @@ fm801ch_setspeed(kobj_t obj, void *data, u_int32_t speed)
{
struct fm801_chinfo *ch = data;
struct fm801_info *fm801 = ch->parent;
register int i;
int i;
for (i = 0; i < 10 && fm801_rates[i].limit <= speed; i++) ;

View File

@ -201,7 +201,7 @@ playinit()
static void
playtone(int pitch, int value, int sustain)
{
register int sound, silence, snum = 1, sdenom = 1;
int sound, silence, snum = 1, sdenom = 1;
/* this weirdness avoids floating-point arithmetic */
for (; sustain; sustain--) {
@ -243,7 +243,7 @@ playstring(char *cp, size_t slen)
{v = v * 10 + (*++cp - '0'); slen--;}
for (; slen--; cp++) {
int sustain, timeval, tempo;
register char c = toupper(*cp);
char c = toupper(*cp);
#ifdef DEBUG
(void) printf("playstring: %c (%x)\n", c, c);

View File

@ -534,7 +534,7 @@ static u_int8_t tl_eeprom_putbyte(sc, byte)
struct tl_softc *sc;
int byte;
{
register int i, ack = 0;
int i, ack = 0;
/*
* Make sure we're in TX mode.
@ -579,7 +579,7 @@ static u_int8_t tl_eeprom_getbyte(sc, addr, dest)
int addr;
u_int8_t *dest;
{
register int i;
int i;
u_int8_t byte = 0;
device_t tl_dev = sc->tl_dev;
@ -2199,7 +2199,7 @@ static void
tl_stop(sc)
struct tl_softc *sc;
{
register int i;
int i;
struct ifnet *ifp;
TL_LOCK_ASSERT(sc);

View File

@ -232,7 +232,7 @@ struct usb_m_copy_in_arg {
static int
usbd_m_copy_in_cb(void *arg, void *src, uint32_t count)
{
register struct usb_m_copy_in_arg *ua = arg;
struct usb_m_copy_in_arg *ua = arg;
usbd_copy_in(ua->cache, ua->dst_offset, src, count);
ua->dst_offset += count;

View File

@ -256,7 +256,7 @@ wb_eeprom_putbyte(sc, addr)
struct wb_softc *sc;
int addr;
{
register int d, i;
int d, i;
d = addr | WB_EECMD_READ;
@ -286,7 +286,7 @@ wb_eeprom_getword(sc, addr, dest)
int addr;
u_int16_t *dest;
{
register int i;
int i;
u_int16_t word = 0;
/* Enter EEPROM access mode. */
@ -507,7 +507,7 @@ static void
wb_reset(sc)
struct wb_softc *sc;
{
register int i;
int i;
struct mii_data *mii;
struct mii_softc *miisc;
@ -1574,7 +1574,7 @@ static void
wb_stop(sc)
struct wb_softc *sc;
{
register int i;
int i;
struct ifnet *ifp;
WB_LOCK_ASSERT(sc);

View File

@ -353,7 +353,7 @@ xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
static void
xl_wait(struct xl_softc *sc)
{
register int i;
int i;
for (i = 0; i < XL_TIMEOUT; i++) {
if ((CSR_READ_2(sc, XL_STATUS) & XL_STAT_CMDBUSY) == 0)
@ -836,7 +836,7 @@ xl_setmode(struct xl_softc *sc, int media)
static void
xl_reset(struct xl_softc *sc)
{
register int i;
int i;
XL_LOCK_ASSERT(sc);
@ -3153,7 +3153,7 @@ xl_watchdog(struct xl_softc *sc)
static void
xl_stop(struct xl_softc *sc)
{
register int i;
int i;
struct ifnet *ifp = sc->xl_ifp;
XL_LOCK_ASSERT(sc);

View File

@ -313,7 +313,7 @@ int
fifo_printinfo(vp)
struct vnode *vp;
{
register struct fifoinfo *fip = vp->v_fifoinfo;
struct fifoinfo *fip = vp->v_fifoinfo;
if (fip == NULL){
printf(", NULL v_fifoinfo");

View File

@ -129,8 +129,8 @@ nandfs_reclaim(struct vop_reclaim_args *ap)
static int
nandfs_read(struct vop_read_args *ap)
{
register struct vnode *vp = ap->a_vp;
register struct nandfs_node *node = VTON(vp);
struct vnode *vp = ap->a_vp;
struct nandfs_node *node = VTON(vp);
struct nandfs_device *nandfsdev = node->nn_nandfsdev;
struct uio *uio = ap->a_uio;
struct buf *bp;

View File

@ -263,9 +263,9 @@ in_cksum_skip(m, len, skip)
int len;
int skip;
{
register u_short *w;
register unsigned sum = 0;
register int mlen = 0;
u_short *w;
unsigned sum = 0;
int mlen = 0;
int byte_swapped = 0;
union { char c[2]; u_short s; } su;

View File

@ -78,7 +78,7 @@ static __inline int
k6_mrmake(struct mem_range_desc *desc, u_int32_t *mtrr)
{
u_int32_t len = 0, wc, uc;
register int bit;
int bit;
if (desc->mr_base &~ 0xfffe0000)
return (EINVAL);

View File

@ -98,9 +98,7 @@ struct sysarch_args {
#endif
int
sysarch(td, uap)
struct thread *td;
register struct sysarch_args *uap;
sysarch(struct thread *td, struct sysarch_args *uap)
{
int error;
union descriptor *lp;

View File

@ -166,7 +166,7 @@ alloc_fpusave(int flags)
void
cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
{
register struct proc *p1;
struct proc *p1;
struct pcb *pcb2;
struct mdproc *mdp2;

View File

@ -93,9 +93,7 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
int
ibcs2_ulimit(td, uap)
struct thread *td;
struct ibcs2_ulimit_args *uap;
ibcs2_ulimit(struct thread *td, struct ibcs2_ulimit_args *uap)
{
struct rlimit rl;
int error;
@ -134,9 +132,7 @@ ibcs2_ulimit(td, uap)
#define IBCS2_WSTOPPED 0177
#define IBCS2_STOPCODE(sig) ((sig) << 8 | IBCS2_WSTOPPED)
int
ibcs2_wait(td, uap)
struct thread *td;
struct ibcs2_wait_args *uap;
ibcs2_wait(struct thread *td, struct ibcs2_wait_args *uap)
{
int error, options, status;
int *statusp;
@ -185,9 +181,7 @@ ibcs2_wait(td, uap)
}
int
ibcs2_execv(td, uap)
struct thread *td;
struct ibcs2_execv_args *uap;
ibcs2_execv(struct thread *td, struct ibcs2_execv_args *uap)
{
struct image_args eargs;
struct vmspace *oldvmspace;
@ -210,9 +204,7 @@ ibcs2_execv(td, uap)
}
int
ibcs2_execve(td, uap)
struct thread *td;
struct ibcs2_execve_args *uap;
ibcs2_execve(struct thread *td, struct ibcs2_execve_args *uap)
{
struct image_args eargs;
struct vmspace *oldvmspace;
@ -236,9 +228,7 @@ ibcs2_execve(td, uap)
}
int
ibcs2_umount(td, uap)
struct thread *td;
struct ibcs2_umount_args *uap;
ibcs2_umount(struct thread *td, struct ibcs2_umount_args *uap)
{
struct unmount_args um;
@ -248,9 +238,7 @@ ibcs2_umount(td, uap)
}
int
ibcs2_mount(td, uap)
struct thread *td;
struct ibcs2_mount_args *uap;
ibcs2_mount(struct thread *td, struct ibcs2_mount_args *uap)
{
#ifdef notyet
int oflags = uap->flags, nflags, error;
@ -321,15 +309,13 @@ ibcs2_mount(td, uap)
*/
int
ibcs2_getdents(td, uap)
struct thread *td;
register struct ibcs2_getdents_args *uap;
ibcs2_getdents(struct thread *td, struct ibcs2_getdents_args *uap)
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
register int len, reclen; /* BSD-format */
register caddr_t outp; /* iBCS2-format */
register int resid; /* iBCS2-format */
struct vnode *vp;
caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */
caddr_t outp; /* iBCS2-format */
int resid; /* iBCS2-format */
cap_rights_t rights;
struct file *fp;
struct uio auio;
@ -475,15 +461,13 @@ ibcs2_getdents(td, uap)
}
int
ibcs2_read(td, uap)
struct thread *td;
struct ibcs2_read_args *uap;
ibcs2_read(struct thread *td, struct ibcs2_read_args *uap)
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
register int len, reclen; /* BSD-format */
register caddr_t outp; /* iBCS2-format */
register int resid; /* iBCS2-format */
struct vnode *vp;
caddr_t inp, buf; /* BSD-format */
int len, reclen; /* BSD-format */
caddr_t outp; /* iBCS2-format */
int resid; /* iBCS2-format */
cap_rights_t rights;
struct file *fp;
struct uio auio;
@ -640,9 +624,7 @@ ibcs2_read(td, uap)
}
int
ibcs2_mknod(td, uap)
struct thread *td;
struct ibcs2_mknod_args *uap;
ibcs2_mknod(struct thread *td, struct ibcs2_mknod_args *uap)
{
char *path;
int error;
@ -660,9 +642,7 @@ ibcs2_mknod(td, uap)
}
int
ibcs2_getgroups(td, uap)
struct thread *td;
struct ibcs2_getgroups_args *uap;
ibcs2_getgroups(struct thread *td, struct ibcs2_getgroups_args *uap)
{
struct ucred *cred;
ibcs2_gid_t *iset;
@ -690,9 +670,7 @@ ibcs2_getgroups(td, uap)
}
int
ibcs2_setgroups(td, uap)
struct thread *td;
struct ibcs2_setgroups_args *uap;
ibcs2_setgroups(struct thread *td, struct ibcs2_setgroups_args *uap)
{
ibcs2_gid_t *iset;
gid_t *gp;
@ -722,9 +700,7 @@ ibcs2_setgroups(td, uap)
}
int
ibcs2_setuid(td, uap)
struct thread *td;
struct ibcs2_setuid_args *uap;
ibcs2_setuid(struct thread *td, struct ibcs2_setuid_args *uap)
{
struct setuid_args sa;
@ -733,9 +709,7 @@ ibcs2_setuid(td, uap)
}
int
ibcs2_setgid(td, uap)
struct thread *td;
struct ibcs2_setgid_args *uap;
ibcs2_setgid(struct thread *td, struct ibcs2_setgid_args *uap)
{
struct setgid_args sa;
@ -744,9 +718,7 @@ ibcs2_setgid(td, uap)
}
int
ibcs2_time(td, uap)
struct thread *td;
struct ibcs2_time_args *uap;
ibcs2_time(struct thread *td, struct ibcs2_time_args *uap)
{
struct timeval tv;
@ -760,9 +732,7 @@ ibcs2_time(td, uap)
}
int
ibcs2_pathconf(td, uap)
struct thread *td;
struct ibcs2_pathconf_args *uap;
ibcs2_pathconf(struct thread *td, struct ibcs2_pathconf_args *uap)
{
char *path;
int error;
@ -775,18 +745,14 @@ ibcs2_pathconf(td, uap)
}
int
ibcs2_fpathconf(td, uap)
struct thread *td;
struct ibcs2_fpathconf_args *uap;
ibcs2_fpathconf(struct thread *td, struct ibcs2_fpathconf_args *uap)
{
uap->name++; /* iBCS2 _PC_* defines are offset by one */
return sys_fpathconf(td, (struct fpathconf_args *)uap);
}
int
ibcs2_sysconf(td, uap)
struct thread *td;
struct ibcs2_sysconf_args *uap;
ibcs2_sysconf(struct thread *td, struct ibcs2_sysconf_args *uap)
{
int mib[2], value, len, error;
@ -845,9 +811,7 @@ ibcs2_sysconf(td, uap)
}
int
ibcs2_alarm(td, uap)
struct thread *td;
struct ibcs2_alarm_args *uap;
ibcs2_alarm(struct thread *td, struct ibcs2_alarm_args *uap)
{
struct itimerval itv, oitv;
int error;
@ -865,9 +829,7 @@ ibcs2_alarm(td, uap)
}
int
ibcs2_times(td, uap)
struct thread *td;
struct ibcs2_times_args *uap;
ibcs2_times(struct thread *td, struct ibcs2_times_args *uap)
{
struct rusage ru;
struct timeval t;
@ -895,9 +857,7 @@ ibcs2_times(td, uap)
}
int
ibcs2_stime(td, uap)
struct thread *td;
struct ibcs2_stime_args *uap;
ibcs2_stime(struct thread *td, struct ibcs2_stime_args *uap)
{
struct timeval tv;
long secs;
@ -915,9 +875,7 @@ ibcs2_stime(td, uap)
}
int
ibcs2_utime(td, uap)
struct thread *td;
struct ibcs2_utime_args *uap;
ibcs2_utime(struct thread *td, struct ibcs2_utime_args *uap)
{
struct ibcs2_utimbuf ubuf;
struct timeval tbuf[2], *tp;
@ -944,9 +902,7 @@ ibcs2_utime(td, uap)
}
int
ibcs2_nice(td, uap)
struct thread *td;
struct ibcs2_nice_args *uap;
ibcs2_nice(struct thread *td, struct ibcs2_nice_args *uap)
{
int error;
struct setpriority_args sa;
@ -965,9 +921,7 @@ ibcs2_nice(td, uap)
*/
int
ibcs2_pgrpsys(td, uap)
struct thread *td;
struct ibcs2_pgrpsys_args *uap;
ibcs2_pgrpsys(struct thread *td, struct ibcs2_pgrpsys_args *uap)
{
struct proc *p = td->td_proc;
switch (uap->type) {
@ -1012,9 +966,7 @@ ibcs2_pgrpsys(td, uap)
*/
int
ibcs2_plock(td, uap)
struct thread *td;
struct ibcs2_plock_args *uap;
ibcs2_plock(struct thread *td, struct ibcs2_plock_args *uap)
{
int error;
#define IBCS2_UNLOCK 0
@ -1044,9 +996,7 @@ ibcs2_plock(td, uap)
}
int
ibcs2_uadmin(td, uap)
struct thread *td;
struct ibcs2_uadmin_args *uap;
ibcs2_uadmin(struct thread *td, struct ibcs2_uadmin_args *uap)
{
#define SCO_A_REBOOT 1
#define SCO_A_SHUTDOWN 2
@ -1093,9 +1043,7 @@ ibcs2_uadmin(td, uap)
}
int
ibcs2_sysfs(td, uap)
struct thread *td;
struct ibcs2_sysfs_args *uap;
ibcs2_sysfs(struct thread *td, struct ibcs2_sysfs_args *uap)
{
#define IBCS2_GETFSIND 1
#define IBCS2_GETFSTYP 2
@ -1111,9 +1059,7 @@ ibcs2_sysfs(td, uap)
}
int
ibcs2_unlink(td, uap)
struct thread *td;
struct ibcs2_unlink_args *uap;
ibcs2_unlink(struct thread *td, struct ibcs2_unlink_args *uap)
{
char *path;
int error;
@ -1125,9 +1071,7 @@ ibcs2_unlink(td, uap)
}
int
ibcs2_chdir(td, uap)
struct thread *td;
struct ibcs2_chdir_args *uap;
ibcs2_chdir(struct thread *td, struct ibcs2_chdir_args *uap)
{
char *path;
int error;
@ -1139,9 +1083,7 @@ ibcs2_chdir(td, uap)
}
int
ibcs2_chmod(td, uap)
struct thread *td;
struct ibcs2_chmod_args *uap;
ibcs2_chmod(struct thread *td, struct ibcs2_chmod_args *uap)
{
char *path;
int error;
@ -1153,9 +1095,7 @@ ibcs2_chmod(td, uap)
}
int
ibcs2_chown(td, uap)
struct thread *td;
struct ibcs2_chown_args *uap;
ibcs2_chown(struct thread *td, struct ibcs2_chown_args *uap)
{
char *path;
int error;
@ -1168,9 +1108,7 @@ ibcs2_chown(td, uap)
}
int
ibcs2_rmdir(td, uap)
struct thread *td;
struct ibcs2_rmdir_args *uap;
ibcs2_rmdir(struct thread *td, struct ibcs2_rmdir_args *uap)
{
char *path;
int error;
@ -1182,9 +1120,7 @@ ibcs2_rmdir(td, uap)
}
int
ibcs2_mkdir(td, uap)
struct thread *td;
struct ibcs2_mkdir_args *uap;
ibcs2_mkdir(struct thread *td, struct ibcs2_mkdir_args *uap)
{
char *path;
int error;
@ -1196,9 +1132,7 @@ ibcs2_mkdir(td, uap)
}
int
ibcs2_symlink(td, uap)
struct thread *td;
struct ibcs2_symlink_args *uap;
ibcs2_symlink(struct thread *td, struct ibcs2_symlink_args *uap)
{
char *path, *link;
int error;
@ -1221,9 +1155,7 @@ ibcs2_symlink(td, uap)
}
int
ibcs2_rename(td, uap)
struct thread *td;
struct ibcs2_rename_args *uap;
ibcs2_rename(struct thread *td, struct ibcs2_rename_args *uap)
{
char *from, *to;
int error;
@ -1246,9 +1178,7 @@ ibcs2_rename(td, uap)
}
int
ibcs2_readlink(td, uap)
struct thread *td;
struct ibcs2_readlink_args *uap;
ibcs2_readlink(struct thread *td, struct ibcs2_readlink_args *uap)
{
char *path;
int error;

View File

@ -68,7 +68,7 @@ ibcs2_secure(struct thread *td, struct ibcs2_secure_args *uap)
}
int
ibcs2_lseek(struct thread *td, register struct ibcs2_lseek_args *uap)
ibcs2_lseek(struct thread *td, struct ibcs2_lseek_args *uap)
{
struct lseek_args largs;
int error;

View File

@ -190,9 +190,7 @@ bsd_to_ibcs2_sigaction(bsa, isa)
}
int
ibcs2_sigaction(td, uap)
register struct thread *td;
struct ibcs2_sigaction_args *uap;
ibcs2_sigaction(struct thread *td, struct ibcs2_sigaction_args *uap)
{
struct ibcs2_sigaction isa;
struct sigaction nbsa, obsa;
@ -218,9 +216,7 @@ ibcs2_sigaction(td, uap)
}
int
ibcs2_sigsys(td, uap)
register struct thread *td;
struct ibcs2_sigsys_args *uap;
ibcs2_sigsys(struct thread *td, struct ibcs2_sigsys_args *uap)
{
struct proc *p = td->td_proc;
struct sigaction sa;
@ -341,9 +337,7 @@ ibcs2_sigsys(td, uap)
}
int
ibcs2_sigprocmask(td, uap)
register struct thread *td;
struct ibcs2_sigprocmask_args *uap;
ibcs2_sigprocmask(struct thread *td, struct ibcs2_sigprocmask_args *uap)
{
ibcs2_sigset_t iss;
sigset_t oss, nss;
@ -379,9 +373,7 @@ ibcs2_sigprocmask(td, uap)
}
int
ibcs2_sigpending(td, uap)
register struct thread *td;
struct ibcs2_sigpending_args *uap;
ibcs2_sigpending(struct thread *td, struct ibcs2_sigpending_args *uap)
{
struct proc *p = td->td_proc;
sigset_t bss;
@ -398,9 +390,7 @@ ibcs2_sigpending(td, uap)
}
int
ibcs2_sigsuspend(td, uap)
register struct thread *td;
struct ibcs2_sigsuspend_args *uap;
ibcs2_sigsuspend(struct thread *td, struct ibcs2_sigsuspend_args *uap)
{
ibcs2_sigset_t sss;
sigset_t bss;
@ -414,9 +404,7 @@ ibcs2_sigsuspend(td, uap)
}
int
ibcs2_pause(td, uap)
register struct thread *td;
struct ibcs2_pause_args *uap;
ibcs2_pause(struct thread *td, struct ibcs2_pause_args *uap)
{
sigset_t mask;
@ -427,9 +415,7 @@ ibcs2_pause(td, uap)
}
int
ibcs2_kill(td, uap)
register struct thread *td;
struct ibcs2_kill_args *uap;
ibcs2_kill(struct thread *td, struct ibcs2_kill_args *uap)
{
struct kill_args ka;

View File

@ -58,9 +58,7 @@ static int ibcs2_setipdomainname(struct thread *,
*/
int
ibcs2_socksys(td, uap)
register struct thread *td;
register struct ibcs2_socksys_args *uap;
ibcs2_socksys(struct thread *td, struct ibcs2_socksys_args *uap)
{
int error;
int realargs[7]; /* 1 for command, 6 for recvfrom */
@ -142,9 +140,7 @@ ibcs2_socksys(td, uap)
/* ARGSUSED */
static int
ibcs2_getipdomainname(td, uap)
struct thread *td;
struct getipdomainname_args *uap;
ibcs2_getipdomainname(struct thread *td, struct getipdomainname_args *uap)
{
char hname[MAXHOSTNAMELEN], *dptr;
int len;
@ -167,9 +163,7 @@ ibcs2_getipdomainname(td, uap)
/* ARGSUSED */
static int
ibcs2_setipdomainname(td, uap)
struct thread *td;
struct setipdomainname_args *uap;
ibcs2_setipdomainname(struct thread *td, struct setipdomainname_args *uap)
{
char hname[MAXHOSTNAMELEN], *ptr;
int error, sctl[2], hlen;

View File

@ -51,7 +51,7 @@ struct CCBTYPE##que { \
\
void DEV##_init_ccbque(int); \
struct CCBTYPE *DEV##_get_ccb(void); \
void DEV##_free_ccb(register struct CCBTYPE *);
void DEV##_free_ccb(struct CCBTYPE *);
/* (II) static allocated memory */
#define GENERIC_CCB_STATIC_ALLOC(DEV, CCBTYPE) \
@ -72,7 +72,7 @@ DEV##_init_ccbque(count) \
struct CCBTYPE * \
DEV##_get_ccb() \
{ \
register struct CCBTYPE *cb; \
struct CCBTYPE *cb; \
int s = splcam(); \
\
if (CCBTYPE##que.count < CCBTYPE##que.maxccb) \
@ -105,7 +105,7 @@ out: \
\
void \
DEV##_free_ccb(cb) \
register struct CCBTYPE *cb; \
struct CCBTYPE *cb; \
{ \
int s = splcam(); \
\

View File

@ -70,8 +70,8 @@ elink_reset()
void
elink_idseq(u_char p)
{
register int i;
register u_char c;
int i;
u_char c;
c = 0xff;
for (i = 255; i; i--) {

View File

@ -431,17 +431,17 @@ huft_build(struct inflate *glbl, unsigned *b, unsigned n, unsigned s,
unsigned f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
register unsigned i; /* counter, current code */
register unsigned j; /* counter */
register int k; /* number of bits in current code */
unsigned i; /* counter, current code */
unsigned j; /* counter */
int k; /* number of bits in current code */
int lx[BMAX + 1]; /* memory for l[-1..BMAX-1] */
int *l = lx + 1; /* stack of bits per table */
register unsigned *p; /* pointer into c[], b[], or v[] */
register struct huft *q;/* points to current table */
unsigned *p; /* pointer into c[], b[], or v[] */
struct huft *q; /* points to current table */
struct huft r; /* table entry for structure assignment */
struct huft *u[BMAX];/* table stack */
unsigned v[N_MAX]; /* values in order of bit length */
register int w; /* bits before this table == (l * h) */
int w; /* bits before this table == (l * h) */
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
unsigned *xp; /* pointer into x */
int y; /* number of dummy codes added */
@ -627,7 +627,7 @@ huft_free(struct inflate *glbl, struct huft *t)
list of the tables it made, with the links in a dummy first entry of
each table. */
{
register struct huft *p, *q;
struct huft *p, *q;
/* Go through linked list, freeing from the malloced (t[-1]) address. */
p = t;
@ -650,13 +650,13 @@ static int
inflate_codes(struct inflate *glbl, struct huft *tl, struct huft*td, int bl,
int bd)
{
register unsigned e; /* table entry flag/number of extra bits */
unsigned e; /* table entry flag/number of extra bits */
unsigned n, d; /* length and index for copy */
unsigned w; /* current window position */
struct huft *t; /* pointer to table entry */
unsigned ml, md; /* masks for bl and bd bits */
register ulg b; /* bit buffer */
register unsigned k; /* number of bits in bit buffer */
ulg b; /* bit buffer */
unsigned k; /* number of bits in bit buffer */
/* make local copies of globals */
b = glbl->gz_bb; /* initialize bit buffer */
@ -745,8 +745,8 @@ inflate_stored(struct inflate *glbl)
{
unsigned n; /* number of bytes in block */
unsigned w; /* current window position */
register ulg b; /* bit buffer */
register unsigned k; /* number of bits in bit buffer */
ulg b; /* bit buffer */
unsigned k; /* number of bits in bit buffer */
/* make local copies of globals */
b = glbl->gz_bb; /* initialize bit buffer */
@ -849,8 +849,8 @@ inflate_dynamic(struct inflate *glbl)
unsigned ll[286 + 30]; /* literal/length and distance code
* lengths */
#endif
register ulg b; /* bit buffer */
register unsigned k; /* number of bits in bit buffer */
ulg b; /* bit buffer */
unsigned k; /* number of bits in bit buffer */
/* make local bit buffer */
b = glbl->gz_bb;
@ -980,8 +980,8 @@ static int
inflate_block(struct inflate *glbl, int *e)
{
unsigned t; /* block type */
register ulg b; /* bit buffer */
register unsigned k; /* number of bits in bit buffer */
ulg b; /* bit buffer */
unsigned k; /* number of bits in bit buffer */
/* make local bit buffer */
b = glbl->gz_bb;

View File

@ -390,10 +390,9 @@ static int devpoll_run = 0;
*/
/* ARGSUSED*/
static void
initclocks(dummy)
void *dummy;
initclocks(void *dummy)
{
register int i;
int i;
/*
* Set divisors to 1 (normal case) and let the machine-specific
@ -581,11 +580,10 @@ hardclock_sync(int cpu)
* Compute number of ticks in the specified amount of time.
*/
int
tvtohz(tv)
struct timeval *tv;
tvtohz(struct timeval *tv)
{
register unsigned long ticks;
register long sec, usec;
unsigned long ticks;
long sec, usec;
/*
* If the number of usecs in the whole seconds part of the time
@ -642,8 +640,7 @@ tvtohz(tv)
* keeps the profile clock running constantly.
*/
void
startprofclock(p)
register struct proc *p;
startprofclock(struct proc *p)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
@ -662,8 +659,7 @@ startprofclock(p)
* Stop profiling on a process.
*/
void
stopprofclock(p)
register struct proc *p;
stopprofclock(struct proc *p)
{
PROC_LOCK_ASSERT(p, MA_OWNED);

View File

@ -353,10 +353,7 @@ kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
* userspace pointers from the passed thread.
*/
static int
do_execve(td, args, mac_p)
struct thread *td;
struct image_args *args;
struct mac *mac_p;
do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
{
struct proc *p = td->td_proc;
struct nameidata nd;
@ -1042,8 +1039,7 @@ exec_map_first_page(imgp)
}
void
exec_unmap_first_page(imgp)
struct image_params *imgp;
exec_unmap_first_page(struct image_params *imgp)
{
vm_page_t m;
@ -1063,9 +1059,7 @@ exec_unmap_first_page(imgp)
* automatically in trap.c.
*/
int
exec_new_vmspace(imgp, sv)
struct image_params *imgp;
struct sysentvec *sv;
exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
{
int error;
struct proc *p = imgp->proc;
@ -1460,8 +1454,7 @@ exec_free_args(struct image_args *args)
* as the initial stack pointer.
*/
register_t *
exec_copyout_strings(imgp)
struct image_params *imgp;
exec_copyout_strings(struct image_params *imgp)
{
int argc, envc;
char **vectp;
@ -1617,8 +1610,7 @@ exec_copyout_strings(imgp)
* Return 0 for success or error code on failure.
*/
int
exec_check_permissions(imgp)
struct image_params *imgp;
exec_check_permissions(struct image_params *imgp)
{
struct vnode *vp = imgp->vp;
struct vattr *attr = imgp->attr;
@ -1688,8 +1680,7 @@ exec_check_permissions(imgp)
* Exec handler registration
*/
int
exec_register(execsw_arg)
const struct execsw *execsw_arg;
exec_register(const struct execsw *execsw_arg)
{
const struct execsw **es, **xs, **newexecsw;
int count = 2; /* New slot and trailing NULL */
@ -1711,8 +1702,7 @@ exec_register(execsw_arg)
}
int
exec_unregister(execsw_arg)
const struct execsw *execsw_arg;
exec_unregister(const struct execsw *execsw_arg)
{
const struct execsw **es, **xs, **newexecsw;
int count = 1;

View File

@ -295,7 +295,7 @@ struct getgroups_args {
};
#endif
int
sys_getgroups(struct thread *td, register struct getgroups_args *uap)
sys_getgroups(struct thread *td, struct getgroups_args *uap)
{
struct ucred *cred;
u_int ngrp;
@ -324,7 +324,7 @@ struct setsid_args {
#endif
/* ARGSUSED */
int
sys_setsid(register struct thread *td, struct setsid_args *uap)
sys_setsid(struct thread *td, struct setsid_args *uap)
{
struct pgrp *pgrp;
int error;
@ -382,11 +382,11 @@ struct setpgid_args {
#endif
/* ARGSUSED */
int
sys_setpgid(struct thread *td, register struct setpgid_args *uap)
sys_setpgid(struct thread *td, struct setpgid_args *uap)
{
struct proc *curp = td->td_proc;
register struct proc *targp; /* target process */
register struct pgrp *pgrp; /* target pgrp */
struct proc *targp; /* target process */
struct pgrp *pgrp; /* target pgrp */
int error;
struct pgrp *newpgrp;
@ -877,7 +877,7 @@ struct setreuid_args {
#endif
/* ARGSUSED */
int
sys_setreuid(register struct thread *td, struct setreuid_args *uap)
sys_setreuid(struct thread *td, struct setreuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@ -947,7 +947,7 @@ struct setregid_args {
#endif
/* ARGSUSED */
int
sys_setregid(register struct thread *td, struct setregid_args *uap)
sys_setregid(struct thread *td, struct setregid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@ -1012,7 +1012,7 @@ struct setresuid_args {
#endif
/* ARGSUSED */
int
sys_setresuid(register struct thread *td, struct setresuid_args *uap)
sys_setresuid(struct thread *td, struct setresuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@ -1094,7 +1094,7 @@ struct setresgid_args {
#endif
/* ARGSUSED */
int
sys_setresgid(register struct thread *td, struct setresgid_args *uap)
sys_setresgid(struct thread *td, struct setresgid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@ -1161,7 +1161,7 @@ struct getresuid_args {
#endif
/* ARGSUSED */
int
sys_getresuid(register struct thread *td, struct getresuid_args *uap)
sys_getresuid(struct thread *td, struct getresuid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@ -1188,7 +1188,7 @@ struct getresgid_args {
#endif
/* ARGSUSED */
int
sys_getresgid(register struct thread *td, struct getresgid_args *uap)
sys_getresgid(struct thread *td, struct getresgid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@ -1213,7 +1213,7 @@ struct issetugid_args {
#endif
/* ARGSUSED */
int
sys_issetugid(register struct thread *td, struct issetugid_args *uap)
sys_issetugid(struct thread *td, struct issetugid_args *uap)
{
struct proc *p = td->td_proc;
@ -1778,7 +1778,7 @@ p_canwait(struct thread *td, struct proc *p)
struct ucred *
crget(void)
{
register struct ucred *cr;
struct ucred *cr;
cr = malloc(sizeof(*cr), M_CRED, M_WAITOK | M_ZERO);
refcount_init(&cr->cr_ref, 1);

View File

@ -90,7 +90,7 @@ struct getpriority_args {
};
#endif
int
sys_getpriority(struct thread *td, register struct getpriority_args *uap)
sys_getpriority(struct thread *td, struct getpriority_args *uap)
{
struct proc *p;
struct pgrp *pg;
@ -367,7 +367,7 @@ struct rtprio_args {
};
#endif
int
sys_rtprio(struct thread *td, register struct rtprio_args *uap)
sys_rtprio(struct thread *td, struct rtprio_args *uap)
{
struct proc *p;
struct thread *tdp;
@ -533,7 +533,7 @@ struct osetrlimit_args {
};
#endif
int
osetrlimit(struct thread *td, register struct osetrlimit_args *uap)
osetrlimit(struct thread *td, struct osetrlimit_args *uap)
{
struct orlimit olim;
struct rlimit lim;
@ -554,7 +554,7 @@ struct ogetrlimit_args {
};
#endif
int
ogetrlimit(struct thread *td, register struct ogetrlimit_args *uap)
ogetrlimit(struct thread *td, struct ogetrlimit_args *uap)
{
struct orlimit olim;
struct rlimit rl;
@ -587,7 +587,7 @@ struct __setrlimit_args {
};
#endif
int
sys_setrlimit(struct thread *td, register struct __setrlimit_args *uap)
sys_setrlimit(struct thread *td, struct __setrlimit_args *uap)
{
struct rlimit alim;
int error;
@ -645,7 +645,7 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which,
struct rlimit *limp)
{
struct plimit *newlim, *oldlim;
register struct rlimit *alimp;
struct rlimit *alimp;
struct rlimit oldssiz;
int error;
@ -775,7 +775,7 @@ struct __getrlimit_args {
#endif
/* ARGSUSED */
int
sys_getrlimit(struct thread *td, register struct __getrlimit_args *uap)
sys_getrlimit(struct thread *td, struct __getrlimit_args *uap)
{
struct rlimit rlim;
int error;
@ -945,7 +945,7 @@ struct getrusage_args {
};
#endif
int
sys_getrusage(register struct thread *td, register struct getrusage_args *uap)
sys_getrusage(struct thread *td, struct getrusage_args *uap)
{
struct rusage ru;
int error;

View File

@ -929,7 +929,7 @@ osigreturn(struct thread *td, struct osigreturn_args *uap)
void
siginit(struct proc *p)
{
register int i;
int i;
struct sigacts *ps;
PROC_LOCK(p);
@ -2392,7 +2392,7 @@ static void
tdsigwakeup(struct thread *td, int sig, sig_t action, int intrval)
{
struct proc *p = td->td_proc;
register int prop;
int prop;
int wakeup_swapper;
wakeup_swapper = 0;
@ -2979,7 +2979,7 @@ thread_stopped(struct proc *p)
*/
int
postsig(sig)
register int sig;
int sig;
{
struct thread *td = curthread;
struct proc *p = td->td_proc;

View File

@ -1475,7 +1475,7 @@ _callout_init_lock(struct callout *c, struct lock_object *lock, int flags)
void
adjust_timeout_calltodo(struct timeval *time_change)
{
register struct callout *p;
struct callout *p;
unsigned long delta_ticks;
/*

View File

@ -58,9 +58,7 @@ struct gethostname_args {
#endif
/* ARGSUSED */
int
ogethostname(td, uap)
struct thread *td;
struct gethostname_args *uap;
ogethostname(struct thread *td, struct gethostname_args *uap)
{
int name[2];
size_t len = uap->len;
@ -79,9 +77,7 @@ struct sethostname_args {
#endif
/* ARGSUSED */
int
osethostname(td, uap)
struct thread *td;
register struct sethostname_args *uap;
osethostname(struct thread *td, struct sethostname_args *uap)
{
int name[2];
@ -98,9 +94,7 @@ struct ogethostid_args {
#endif
/* ARGSUSED */
int
ogethostid(td, uap)
struct thread *td;
struct ogethostid_args *uap;
ogethostid(struct thread *td, struct ogethostid_args *uap)
{
size_t len = sizeof(long);
int name[2];
@ -120,9 +114,7 @@ struct osethostid_args {
#endif
/* ARGSUSED */
int
osethostid(td, uap)
struct thread *td;
struct osethostid_args *uap;
osethostid(struct thread *td, struct osethostid_args *uap)
{
int name[2];
@ -133,9 +125,7 @@ osethostid(td, uap)
}
int
oquota(td, uap)
struct thread *td;
struct oquota_args *uap;
oquota(struct thread *td, struct oquota_args *uap)
{
return (ENOSYS);

View File

@ -456,7 +456,7 @@ SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "");
static void
schedcpu(void)
{
register fixpt_t loadfac = loadfactor(averunnable.ldavg[0]);
fixpt_t loadfac = loadfactor(averunnable.ldavg[0]);
struct thread *td;
struct proc *p;
struct td_sched *ts;

View File

@ -480,9 +480,7 @@ struct msgctl_args {
};
#endif
int
sys_msgctl(td, uap)
struct thread *td;
register struct msgctl_args *uap;
sys_msgctl(struct thread *td, struct msgctl_args *uap)
{
int msqid = uap->msqid;
int cmd = uap->cmd;
@ -507,7 +505,7 @@ kern_msgctl(td, msqid, cmd, msqbuf)
struct msqid_ds *msqbuf;
{
int rval, error, msqix;
register struct msqid_kernel *msqkptr;
struct msqid_kernel *msqkptr;
struct prison *rpr;
rpr = msg_find_prison(td->td_ucred);
@ -644,15 +642,13 @@ struct msgget_args {
#endif
int
sys_msgget(td, uap)
struct thread *td;
register struct msgget_args *uap;
sys_msgget(struct thread *td, struct msgget_args *uap)
{
int msqid, error = 0;
int key = uap->key;
int msgflg = uap->msgflg;
struct ucred *cred = td->td_ucred;
register struct msqid_kernel *msqkptr = NULL;
struct msqid_kernel *msqkptr = NULL;
DPRINTF(("msgget(0x%x, 0%o)\n", key, msgflg));
@ -764,23 +760,18 @@ sys_msgget(td, uap)
#ifndef _SYS_SYSPROTO_H_
struct msgsnd_args {
int msqid;
const void *msgp;
const void *msgp; /* XXX msgp is actually mtext. */
size_t msgsz;
int msgflg;
};
#endif
int
kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype)
struct thread *td;
int msqid;
const void *msgp; /* XXX msgp is actually mtext. */
size_t msgsz;
int msgflg;
long mtype;
kern_msgsnd(struct thread *td, int msqid, const void *msgp,
size_t msgsz, int msgflg, long mtype)
{
int msqix, segs_needed, error = 0;
register struct msqid_kernel *msqkptr;
register struct msg *msghdr;
struct msqid_kernel *msqkptr;
struct msg *msghdr;
struct prison *rpr;
short next;
#ifdef RACCT
@ -1117,9 +1108,7 @@ kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype)
}
int
sys_msgsnd(td, uap)
struct thread *td;
register struct msgsnd_args *uap;
sys_msgsnd(struct thread *td, struct msgsnd_args *uap)
{
int error;
long mtype;
@ -1145,19 +1134,14 @@ struct msgrcv_args {
int msgflg;
};
#endif
/* XXX msgp is actually mtext. */
int
kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype)
struct thread *td;
int msqid;
void *msgp; /* XXX msgp is actually mtext. */
size_t msgsz;
long msgtyp;
int msgflg;
long *mtype;
kern_msgrcv(struct thread *td, int msqid, void *msgp, size_t msgsz, long msgtyp,
int msgflg, long *mtype)
{
size_t len;
register struct msqid_kernel *msqkptr;
register struct msg *msghdr;
struct msqid_kernel *msqkptr;
struct msg *msghdr;
struct prison *rpr;
int msqix, error = 0;
short next;
@ -1411,9 +1395,7 @@ kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype)
}
int
sys_msgrcv(td, uap)
struct thread *td;
register struct msgrcv_args *uap;
sys_msgrcv(struct thread *td, struct msgrcv_args *uap)
{
int error;
long mtype;
@ -1812,19 +1794,19 @@ static sy_call_t *msgcalls[] = {
/*
* Entry point for all MSG calls.
*
* XXX actually varargs.
* struct msgsys_args {
* int which;
* int a2;
* int a3;
* int a4;
* int a5;
* int a6;
* } *uap;
*/
int
sys_msgsys(td, uap)
struct thread *td;
/* XXX actually varargs. */
struct msgsys_args /* {
int which;
int a2;
int a3;
int a4;
int a5;
int a6;
} */ *uap;
sys_msgsys(struct thread *td, struct msgsys_args *uap)
{
int error;
@ -1847,9 +1829,7 @@ struct freebsd7_msgctl_args {
};
#endif
int
freebsd7_msgctl(td, uap)
struct thread *td;
struct freebsd7_msgctl_args *uap;
freebsd7_msgctl(struct thread *td, struct freebsd7_msgctl_args *uap)
{
struct msqid_ds_old msqold;
struct msqid_ds msqbuf;

View File

@ -100,9 +100,9 @@ static int
vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
struct export_args *argp)
{
register struct netcred *np;
register struct radix_node_head *rnh;
register int i;
struct netcred *np;
struct radix_node_head *rnh;
int i;
struct radix_node *rn;
struct sockaddr *saddr, *smask = NULL;
#if defined(INET6) || defined(INET)
@ -448,8 +448,8 @@ static struct netcred *
vfs_export_lookup(struct mount *mp, struct sockaddr *nam)
{
struct netexport *nep;
register struct netcred *np;
register struct radix_node_head *rnh;
struct netcred *np;
struct radix_node_head *rnh;
struct sockaddr *saddr;
nep = mp->mnt_export;

View File

@ -366,14 +366,15 @@ vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *oldopts)
/*
* Mount a filesystem.
*/
#ifndef _SYS_SYSPROTO_H_
struct nmount_args {
struct iovec *iovp;
unsigned int iovcnt;
int flags;
};
#endif
int
sys_nmount(td, uap)
struct thread *td;
struct nmount_args /* {
struct iovec *iovp;
unsigned int iovcnt;
int flags;
} */ *uap;
sys_nmount(struct thread *td, struct nmount_args *uap)
{
struct uio *auio;
int error;
@ -706,14 +707,7 @@ struct mount_args {
#endif
/* ARGSUSED */
int
sys_mount(td, uap)
struct thread *td;
struct mount_args /* {
char *type;
char *path;
int flags;
caddr_t data;
} */ *uap;
sys_mount(struct thread *td, struct mount_args *uap)
{
char *fstype;
struct vfsconf *vfsp = NULL;
@ -1544,11 +1538,7 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal)
* with the address of the option.
*/
int
vfs_getopt(opts, name, buf, len)
struct vfsoptlist *opts;
const char *name;
void **buf;
int *len;
vfs_getopt(struct vfsoptlist *opts, const char *name, void **buf, int *len)
{
struct vfsopt *opt;
@ -1761,11 +1751,7 @@ vfs_setopts(struct vfsoptlist *opts, const char *name, const char *value)
* Returns ENOENT if the option is not found.
*/
int
vfs_copyopt(opts, name, dest, len)
struct vfsoptlist *opts;
const char *name;
void *dest;
int len;
vfs_copyopt(struct vfsoptlist *opts, const char *name, void *dest, int len)
{
struct vfsopt *opt;

View File

@ -115,9 +115,7 @@ struct sync_args {
#endif
/* ARGSUSED */
int
sys_sync(td, uap)
struct thread *td;
struct sync_args *uap;
sys_sync(struct thread *td, struct sync_args *uap)
{
struct mount *mp, *nmp;
int save;
@ -156,14 +154,7 @@ struct quotactl_args {
};
#endif
int
sys_quotactl(td, uap)
struct thread *td;
register struct quotactl_args /* {
char *path;
int cmd;
int uid;
caddr_t arg;
} */ *uap;
sys_quotactl(struct thread *td, struct quotactl_args *uap)
{
struct mount *mp;
struct nameidata nd;
@ -291,12 +282,7 @@ struct statfs_args {
};
#endif
int
sys_statfs(td, uap)
struct thread *td;
register struct statfs_args /* {
char *path;
struct statfs *buf;
} */ *uap;
sys_statfs(struct thread *td, struct statfs_args *uap)
{
struct statfs *sfp;
int error;
@ -339,12 +325,7 @@ struct fstatfs_args {
};
#endif
int
sys_fstatfs(td, uap)
struct thread *td;
register struct fstatfs_args /* {
int fd;
struct statfs *buf;
} */ *uap;
sys_fstatfs(struct thread *td, struct fstatfs_args *uap)
{
struct statfs *sfp;
int error;
@ -394,13 +375,7 @@ struct getfsstat_args {
};
#endif
int
sys_getfsstat(td, uap)
struct thread *td;
register struct getfsstat_args /* {
struct statfs *buf;
long bufsize;
int mode;
} */ *uap;
sys_getfsstat(struct thread *td, struct getfsstat_args *uap)
{
size_t count;
int error;
@ -559,12 +534,7 @@ struct freebsd4_statfs_args {
};
#endif
int
freebsd4_statfs(td, uap)
struct thread *td;
struct freebsd4_statfs_args /* {
char *path;
struct ostatfs *buf;
} */ *uap;
freebsd4_statfs(struct thread *td, struct freebsd4_statfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@ -590,12 +560,7 @@ struct freebsd4_fstatfs_args {
};
#endif
int
freebsd4_fstatfs(td, uap)
struct thread *td;
struct freebsd4_fstatfs_args /* {
int fd;
struct ostatfs *buf;
} */ *uap;
freebsd4_fstatfs(struct thread *td, struct freebsd4_fstatfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@ -622,13 +587,7 @@ struct freebsd4_getfsstat_args {
};
#endif
int
freebsd4_getfsstat(td, uap)
struct thread *td;
register struct freebsd4_getfsstat_args /* {
struct ostatfs *buf;
long bufsize;
int mode;
} */ *uap;
freebsd4_getfsstat(struct thread *td, struct freebsd4_getfsstat_args *uap)
{
struct statfs *buf, *sp;
struct ostatfs osb;
@ -668,12 +627,7 @@ struct freebsd4_fhstatfs_args {
};
#endif
int
freebsd4_fhstatfs(td, uap)
struct thread *td;
struct freebsd4_fhstatfs_args /* {
struct fhandle *u_fhp;
struct ostatfs *buf;
} */ *uap;
freebsd4_fhstatfs(struct thread *td, struct freebsd4_fhstatfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@ -697,9 +651,7 @@ freebsd4_fhstatfs(td, uap)
* Convert a new format statfs structure to an old format statfs structure.
*/
static void
cvtstatfs(nsp, osp)
struct statfs *nsp;
struct ostatfs *osp;
cvtstatfs(struct statfs *nsp, struct ostatfs *osp)
{
statfs_scale_blocks(nsp, LONG_MAX);
@ -737,11 +689,7 @@ struct fchdir_args {
};
#endif
int
sys_fchdir(td, uap)
struct thread *td;
struct fchdir_args /* {
int fd;
} */ *uap;
sys_fchdir(struct thread *td, struct fchdir_args *uap)
{
struct vnode *vp, *tdp;
struct mount *mp;
@ -788,11 +736,7 @@ struct chdir_args {
};
#endif
int
sys_chdir(td, uap)
struct thread *td;
struct chdir_args /* {
char *path;
} */ *uap;
sys_chdir(struct thread *td, struct chdir_args *uap)
{
return (kern_chdir(td, uap->path, UIO_USERSPACE));
@ -828,11 +772,7 @@ struct chroot_args {
};
#endif
int
sys_chroot(td, uap)
struct thread *td;
struct chroot_args /* {
char *path;
} */ *uap;
sys_chroot(struct thread *td, struct chroot_args *uap)
{
struct nameidata nd;
int error;
@ -870,9 +810,7 @@ sys_chroot(td, uap)
* instance.
*/
int
change_dir(vp, td)
struct vnode *vp;
struct thread *td;
change_dir(struct vnode *vp, struct thread *td)
{
#ifdef MAC
int error;
@ -936,13 +874,7 @@ struct open_args {
};
#endif
int
sys_open(td, uap)
struct thread *td;
register struct open_args /* {
char *path;
int flags;
int mode;
} */ *uap;
sys_open(struct thread *td, struct open_args *uap)
{
return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -1116,12 +1048,7 @@ struct ocreat_args {
};
#endif
int
ocreat(td, uap)
struct thread *td;
register struct ocreat_args /* {
char *path;
int mode;
} */ *uap;
ocreat(struct thread *td, struct ocreat_args *uap)
{
return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -1140,13 +1067,7 @@ struct mknod_args {
};
#endif
int
sys_mknod(td, uap)
struct thread *td;
register struct mknod_args /* {
char *path;
int mode;
int dev;
} */ *uap;
sys_mknod(struct thread *td, struct mknod_args *uap)
{
return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -1283,12 +1204,7 @@ struct mkfifo_args {
};
#endif
int
sys_mkfifo(td, uap)
struct thread *td;
register struct mkfifo_args /* {
char *path;
int mode;
} */ *uap;
sys_mkfifo(struct thread *td, struct mkfifo_args *uap)
{
return (kern_mkfifoat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -1375,12 +1291,7 @@ struct link_args {
};
#endif
int
sys_link(td, uap)
struct thread *td;
register struct link_args /* {
char *path;
char *link;
} */ *uap;
sys_link(struct thread *td, struct link_args *uap)
{
return (kern_linkat(td, AT_FDCWD, AT_FDCWD, uap->path, uap->link,
@ -1544,12 +1455,7 @@ struct symlink_args {
};
#endif
int
sys_symlink(td, uap)
struct thread *td;
register struct symlink_args /* {
char *path;
char *link;
} */ *uap;
sys_symlink(struct thread *td, struct symlink_args *uap)
{
return (kern_symlinkat(td, uap->path, AT_FDCWD, uap->link,
@ -1641,12 +1547,13 @@ kern_symlinkat(struct thread *td, char *path1, int fd, char *path2,
/*
* Delete a whiteout from the filesystem.
*/
#ifndef _SYS_SYSPROTO_H_
struct undelete_args {
char *path;
};
#endif
int
sys_undelete(td, uap)
struct thread *td;
register struct undelete_args /* {
char *path;
} */ *uap;
sys_undelete(struct thread *td, struct undelete_args *uap)
{
struct mount *mp;
struct nameidata nd;
@ -1693,11 +1600,7 @@ struct unlink_args {
};
#endif
int
sys_unlink(td, uap)
struct thread *td;
struct unlink_args /* {
char *path;
} */ *uap;
sys_unlink(struct thread *td, struct unlink_args *uap)
{
return (kern_unlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, 0));
@ -1862,11 +1765,8 @@ freebsd6_lseek(struct thread *td, struct freebsd6_lseek_args *uap)
* Check access permissions using passed credentials.
*/
static int
vn_access(vp, user_flags, cred, td)
struct vnode *vp;
int user_flags;
struct ucred *cred;
struct thread *td;
vn_access(struct vnode *vp, int user_flags, struct ucred *cred,
struct thread *td)
{
accmode_t accmode;
int error;
@ -1902,12 +1802,7 @@ struct access_args {
};
#endif
int
sys_access(td, uap)
struct thread *td;
register struct access_args /* {
char *path;
int amode;
} */ *uap;
sys_access(struct thread *td, struct access_args *uap)
{
return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -1988,12 +1883,7 @@ struct eaccess_args {
};
#endif
int
sys_eaccess(td, uap)
struct thread *td;
register struct eaccess_args /* {
char *path;
int amode;
} */ *uap;
sys_eaccess(struct thread *td, struct eaccess_args *uap)
{
return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2011,12 +1901,7 @@ struct ostat_args {
};
#endif
int
ostat(td, uap)
struct thread *td;
register struct ostat_args /* {
char *path;
struct ostat *ub;
} */ *uap;
ostat(struct thread *td, struct ostat_args *uap)
{
struct stat sb;
struct ostat osb;
@ -2040,12 +1925,7 @@ struct olstat_args {
};
#endif
int
olstat(td, uap)
struct thread *td;
register struct olstat_args /* {
char *path;
struct ostat *ub;
} */ *uap;
olstat(struct thread *td, struct olstat_args *uap)
{
struct stat sb;
struct ostat osb;
@ -2063,9 +1943,7 @@ olstat(td, uap)
* Convert from an old to a new stat structure.
*/
void
cvtstat(st, ost)
struct stat *st;
struct ostat *ost;
cvtstat(struct stat *st, struct ostat *ost)
{
bzero(ost, sizeof(*ost));
@ -2100,12 +1978,7 @@ struct stat_args {
};
#endif
int
sys_stat(td, uap)
struct thread *td;
register struct stat_args /* {
char *path;
struct stat *ub;
} */ *uap;
sys_stat(struct thread *td, struct stat_args *uap)
{
struct stat sb;
int error;
@ -2187,12 +2060,7 @@ struct lstat_args {
};
#endif
int
sys_lstat(td, uap)
struct thread *td;
register struct lstat_args /* {
char *path;
struct stat *ub;
} */ *uap;
sys_lstat(struct thread *td, struct lstat_args *uap)
{
struct stat sb;
int error;
@ -2208,9 +2076,7 @@ sys_lstat(td, uap)
* Implementation of the NetBSD [l]stat() functions.
*/
void
cvtnstat(sb, nsb)
struct stat *sb;
struct nstat *nsb;
cvtnstat( struct stat *sb, struct nstat *nsb)
{
bzero(nsb, sizeof *nsb);
@ -2239,12 +2105,7 @@ struct nstat_args {
};
#endif
int
sys_nstat(td, uap)
struct thread *td;
register struct nstat_args /* {
char *path;
struct nstat *ub;
} */ *uap;
sys_nstat(struct thread *td, struct nstat_args *uap)
{
struct stat sb;
struct nstat nsb;
@ -2268,12 +2129,7 @@ struct lstat_args {
};
#endif
int
sys_nlstat(td, uap)
struct thread *td;
register struct nlstat_args /* {
char *path;
struct nstat *ub;
} */ *uap;
sys_nlstat(struct thread *td, struct nlstat_args *uap)
{
struct stat sb;
struct nstat nsb;
@ -2297,12 +2153,7 @@ struct pathconf_args {
};
#endif
int
sys_pathconf(td, uap)
struct thread *td;
register struct pathconf_args /* {
char *path;
int name;
} */ *uap;
sys_pathconf(struct thread *td, struct pathconf_args *uap)
{
return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name, FOLLOW));
@ -2315,12 +2166,7 @@ struct lpathconf_args {
};
#endif
int
sys_lpathconf(td, uap)
struct thread *td;
register struct lpathconf_args /* {
char *path;
int name;
} */ *uap;
sys_lpathconf(struct thread *td, struct lpathconf_args *uap)
{
return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name,
@ -2356,13 +2202,7 @@ struct readlink_args {
};
#endif
int
sys_readlink(td, uap)
struct thread *td;
register struct readlink_args /* {
char *path;
char *buf;
size_t count;
} */ *uap;
sys_readlink(struct thread *td, struct readlink_args *uap)
{
return (kern_readlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2434,10 +2274,7 @@ kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
* Common implementation code for chflags() and fchflags().
*/
static int
setfflags(td, vp, flags)
struct thread *td;
struct vnode *vp;
u_long flags;
setfflags(struct thread *td, struct vnode *vp, u_long flags)
{
struct mount *mp;
struct vattr vattr;
@ -2484,12 +2321,7 @@ struct chflags_args {
};
#endif
int
sys_chflags(td, uap)
struct thread *td;
register struct chflags_args /* {
const char *path;
u_long flags;
} */ *uap;
sys_chflags(struct thread *td, struct chflags_args *uap)
{
return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2521,13 +2353,14 @@ sys_chflagsat(struct thread *td, struct chflagsat_args *uap)
/*
* Same as chflags() but doesn't follow symlinks.
*/
#ifndef _SYS_SYSPROTO_H_
struct lchflags_args {
const char *path;
u_long flags;
};
#endif
int
sys_lchflags(td, uap)
struct thread *td;
register struct lchflags_args /* {
const char *path;
u_long flags;
} */ *uap;
sys_lchflags(struct thread *td, struct lchflags_args *uap)
{
return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2564,12 +2397,7 @@ struct fchflags_args {
};
#endif
int
sys_fchflags(td, uap)
struct thread *td;
register struct fchflags_args /* {
int fd;
u_long flags;
} */ *uap;
sys_fchflags(struct thread *td, struct fchflags_args *uap)
{
struct file *fp;
cap_rights_t rights;
@ -2595,11 +2423,7 @@ sys_fchflags(td, uap)
* Common implementation code for chmod(), lchmod() and fchmod().
*/
int
setfmode(td, cred, vp, mode)
struct thread *td;
struct ucred *cred;
struct vnode *vp;
int mode;
setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode)
{
struct mount *mp;
struct vattr vattr;
@ -2630,12 +2454,7 @@ struct chmod_args {
};
#endif
int
sys_chmod(td, uap)
struct thread *td;
register struct chmod_args /* {
char *path;
int mode;
} */ *uap;
sys_chmod(struct thread *td, struct chmod_args *uap)
{
return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2674,12 +2493,7 @@ struct lchmod_args {
};
#endif
int
sys_lchmod(td, uap)
struct thread *td;
register struct lchmod_args /* {
char *path;
int mode;
} */ *uap;
sys_lchmod(struct thread *td, struct lchmod_args *uap)
{
return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2737,12 +2551,8 @@ sys_fchmod(struct thread *td, struct fchmod_args *uap)
* Common implementation for chown(), lchown(), and fchown()
*/
int
setfown(td, cred, vp, uid, gid)
struct thread *td;
struct ucred *cred;
struct vnode *vp;
uid_t uid;
gid_t gid;
setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid,
gid_t gid)
{
struct mount *mp;
struct vattr vattr;
@ -2776,13 +2586,7 @@ struct chown_args {
};
#endif
int
sys_chown(td, uap)
struct thread *td;
register struct chown_args /* {
char *path;
int uid;
int gid;
} */ *uap;
sys_chown(struct thread *td, struct chown_args *uap)
{
return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE, uap->uid,
@ -2843,13 +2647,7 @@ struct lchown_args {
};
#endif
int
sys_lchown(td, uap)
struct thread *td;
register struct lchown_args /* {
char *path;
int uid;
int gid;
} */ *uap;
sys_lchown(struct thread *td, struct lchown_args *uap)
{
return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -2867,13 +2665,7 @@ struct fchown_args {
};
#endif
int
sys_fchown(td, uap)
struct thread *td;
register struct fchown_args /* {
int fd;
int uid;
int gid;
} */ *uap;
sys_fchown(struct thread *td, struct fchown_args *uap)
{
struct file *fp;
cap_rights_t rights;
@ -2893,10 +2685,8 @@ sys_fchown(td, uap)
* Common implementation code for utimes(), lutimes(), and futimes().
*/
static int
getutimes(usrtvp, tvpseg, tsp)
const struct timeval *usrtvp;
enum uio_seg tvpseg;
struct timespec *tsp;
getutimes(const struct timeval *usrtvp, enum uio_seg tvpseg,
struct timespec *tsp)
{
struct timeval tv[2];
const struct timeval *tvp;
@ -2973,12 +2763,8 @@ getutimens(const struct timespec *usrtsp, enum uio_seg tspseg,
* and utimensat().
*/
static int
setutimes(td, vp, ts, numtimes, nullflag)
struct thread *td;
struct vnode *vp;
const struct timespec *ts;
int numtimes;
int nullflag;
setutimes(struct thread *td, struct vnode *vp, const struct timespec *ts,
int numtimes, int nullflag)
{
struct mount *mp;
struct vattr vattr;
@ -3021,12 +2807,7 @@ struct utimes_args {
};
#endif
int
sys_utimes(td, uap)
struct thread *td;
register struct utimes_args /* {
char *path;
struct timeval *tptr;
} */ *uap;
sys_utimes(struct thread *td, struct utimes_args *uap)
{
return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -3080,12 +2861,7 @@ struct lutimes_args {
};
#endif
int
sys_lutimes(td, uap)
struct thread *td;
register struct lutimes_args /* {
char *path;
struct timeval *tptr;
} */ *uap;
sys_lutimes(struct thread *td, struct lutimes_args *uap)
{
return (kern_lutimes(td, uap->path, UIO_USERSPACE, uap->tptr,
@ -3121,12 +2897,7 @@ struct futimes_args {
};
#endif
int
sys_futimes(td, uap)
struct thread *td;
register struct futimes_args /* {
int fd;
struct timeval *tptr;
} */ *uap;
sys_futimes(struct thread *td, struct futimes_args *uap)
{
return (kern_futimes(td, uap->fd, uap->tptr, UIO_USERSPACE));
@ -3244,13 +3015,7 @@ struct truncate_args {
};
#endif
int
sys_truncate(td, uap)
struct thread *td;
register struct truncate_args /* {
char *path;
int pad;
off_t length;
} */ *uap;
sys_truncate(struct thread *td, struct truncate_args *uap)
{
return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
@ -3409,12 +3174,7 @@ struct rename_args {
};
#endif
int
sys_rename(td, uap)
struct thread *td;
register struct rename_args /* {
char *from;
char *to;
} */ *uap;
sys_rename(struct thread *td, struct rename_args *uap)
{
return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD,
@ -3579,12 +3339,7 @@ struct mkdir_args {
};
#endif
int
sys_mkdir(td, uap)
struct thread *td;
register struct mkdir_args /* {
char *path;
int mode;
} */ *uap;
sys_mkdir(struct thread *td, struct mkdir_args *uap)
{
return (kern_mkdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@ -3677,11 +3432,7 @@ struct rmdir_args {
};
#endif
int
sys_rmdir(td, uap)
struct thread *td;
struct rmdir_args /* {
char *path;
} */ *uap;
sys_rmdir(struct thread *td, struct rmdir_args *uap)
{
return (kern_rmdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE));
@ -3918,14 +3669,7 @@ struct getdirentries_args {
};
#endif
int
sys_getdirentries(td, uap)
struct thread *td;
register struct getdirentries_args /* {
int fd;
char *buf;
u_int count;
long *basep;
} */ *uap;
sys_getdirentries(struct thread *td, struct getdirentries_args *uap)
{
long base;
int error;
@ -4023,13 +3767,7 @@ struct getdents_args {
};
#endif
int
sys_getdents(td, uap)
struct thread *td;
register struct getdents_args /* {
int fd;
char *buf;
u_int count;
} */ *uap;
sys_getdents(struct thread *td, struct getdents_args *uap)
{
struct getdirentries_args ap;
@ -4049,11 +3787,7 @@ struct umask_args {
};
#endif
int
sys_umask(td, uap)
struct thread *td;
struct umask_args /* {
int newmask;
} */ *uap;
sys_umask(struct thread *td, struct umask_args *uap)
{
struct filedesc *fdp;
@ -4075,11 +3809,7 @@ struct revoke_args {
};
#endif
int
sys_revoke(td, uap)
struct thread *td;
register struct revoke_args /* {
char *path;
} */ *uap;
sys_revoke(struct thread *td, struct revoke_args *uap)
{
struct vnode *vp;
struct vattr vattr;
@ -4162,13 +3892,11 @@ struct lgetfh_args {
};
#endif
int
sys_lgetfh(td, uap)
struct thread *td;
register struct lgetfh_args *uap;
sys_lgetfh(struct thread *td, struct lgetfh_args *uap)
{
struct nameidata nd;
fhandle_t fh;
register struct vnode *vp;
struct vnode *vp;
int error;
error = priv_check(td, PRIV_VFS_GETFH);
@ -4197,13 +3925,11 @@ struct getfh_args {
};
#endif
int
sys_getfh(td, uap)
struct thread *td;
register struct getfh_args *uap;
sys_getfh(struct thread *td, struct getfh_args *uap)
{
struct nameidata nd;
fhandle_t fh;
register struct vnode *vp;
struct vnode *vp;
int error;
error = priv_check(td, PRIV_VFS_GETFH);
@ -4239,12 +3965,7 @@ struct fhopen_args {
};
#endif
int
sys_fhopen(td, uap)
struct thread *td;
struct fhopen_args /* {
const struct fhandle *u_fhp;
int flags;
} */ *uap;
sys_fhopen(struct thread *td, struct fhopen_args *uap)
{
struct mount *mp;
struct vnode *vp;
@ -4328,12 +4049,7 @@ struct fhstat_args {
};
#endif
int
sys_fhstat(td, uap)
struct thread *td;
register struct fhstat_args /* {
struct fhandle *u_fhp;
struct stat *sb;
} */ *uap;
sys_fhstat(struct thread *td, struct fhstat_args *uap)
{
struct stat sb;
struct fhandle fh;
@ -4379,12 +4095,7 @@ struct fhstatfs_args {
};
#endif
int
sys_fhstatfs(td, uap)
struct thread *td;
struct fhstatfs_args /* {
struct fhandle *u_fhp;
struct statfs *buf;
} */ *uap;
sys_fhstatfs(struct thread *td, struct fhstatfs_args *uap)
{
struct statfs *sfp;
fhandle_t fh;

View File

@ -411,8 +411,7 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
* Prototype text segments cannot be written.
*/
int
vn_writechk(vp)
register struct vnode *vp;
vn_writechk(struct vnode *vp)
{
ASSERT_VOP_LOCKED(vp, "vn_writechk");
@ -1368,15 +1367,11 @@ vn_statfile(fp, sb, active_cred, td)
* Stat a vnode; implementation for the stat syscall
*/
int
vn_stat(vp, sb, active_cred, file_cred, td)
struct vnode *vp;
register struct stat *sb;
struct ucred *active_cred;
struct ucred *file_cred;
struct thread *td;
vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
struct ucred *file_cred, struct thread *td)
{
struct vattr vattr;
register struct vattr *vap;
struct vattr *vap;
int error;
u_short mode;
@ -1479,12 +1474,8 @@ vn_stat(vp, sb, active_cred, file_cred, td)
* File table vnode ioctl routine.
*/
static int
vn_ioctl(fp, com, data, active_cred, td)
struct file *fp;
u_long com;
void *data;
struct ucred *active_cred;
struct thread *td;
vn_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
struct thread *td)
{
struct vattr vattr;
struct vnode *vp;
@ -1522,11 +1513,8 @@ vn_ioctl(fp, com, data, active_cred, td)
* File table vnode poll routine.
*/
static int
vn_poll(fp, events, active_cred, td)
struct file *fp;
int events;
struct ucred *active_cred;
struct thread *td;
vn_poll(struct file *fp, int events, struct ucred *active_cred,
struct thread *td)
{
struct vnode *vp;
int error;
@ -1771,8 +1759,7 @@ vn_start_secondary_write(struct vnode *vp, struct mount **mpp, int flags)
* now in effect.
*/
void
vn_finished_write(mp)
struct mount *mp;
vn_finished_write(struct mount *mp)
{
if (mp == NULL || !vn_suspendable(mp))
return;
@ -1794,8 +1781,7 @@ vn_finished_write(mp)
* that the suspension is now in effect.
*/
void
vn_finished_secondary_write(mp)
struct mount *mp;
vn_finished_secondary_write(struct mount *mp)
{
if (mp == NULL || !vn_suspendable(mp))
return;

View File

@ -1282,9 +1282,9 @@ local uInt longest_match(s, cur_match)
IPos cur_match; /* current match */
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */
register int len; /* length of current match */
Bytef *scan = s->window + s->strstart; /* current string */
Bytef *match; /* matched string */
int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@ -1299,13 +1299,13 @@ local uInt longest_match(s, cur_match)
/* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check.
*/
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
register ush scan_start = *(ushf*)scan;
register ush scan_end = *(ushf*)(scan+best_len-1);
Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
ush scan_start = *(ushf*)scan;
ush scan_end = *(ushf*)(scan+best_len-1);
#else
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
register Byte scan_end1 = scan[best_len-1];
register Byte scan_end = scan[best_len];
Bytef *strend = s->window + s->strstart + MAX_MATCH;
Byte scan_end1 = scan[best_len-1];
Byte scan_end = scan[best_len];
#endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@ -1457,8 +1457,8 @@ local void check_match(s, start, match, length)
local void fill_window(s)
deflate_state *s;
{
register unsigned n, m;
register Posf *p;
unsigned n, m;
Posf *p;
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
@ -2923,7 +2923,7 @@ local unsigned bi_reverse(code, len)
unsigned code; /* the value to invert */
int len; /* its bit length */
{
register unsigned res = 0;
unsigned res = 0;
do {
res |= code & 1;
code >>= 1, res <<= 1;
@ -4222,16 +4222,16 @@ z_streamp zs; /* for zalloc function */
uInt f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
register uInt i; /* counter, current code */
register uInt j; /* counter */
register int k; /* number of bits in current code */
uInt i; /* counter, current code */
uInt j; /* counter */
int k; /* number of bits in current code */
int l; /* bits per table (returned in m) */
register uIntf *p; /* pointer into c[], b[], or v[] */
uIntf *p; /* pointer into c[], b[], or v[] */
inflate_huft *q; /* points to current table */
struct inflate_huft_s r; /* table entry for structure assignment */
inflate_huft *u[BMAX]; /* table stack */
uInt v[N_MAX]; /* values in order of bit length */
register int w; /* bits before this table == (l * h) */
int w; /* bits before this table == (l * h) */
uInt x[BMAX+1]; /* bit offsets, then code stack */
uIntf *xp; /* pointer into x */
int y; /* number of dummy codes added */
@ -4561,7 +4561,7 @@ z_streamp z; /* for zfree function */
list of the tables it made, with the links in a dummy first entry of
each table. */
{
register inflate_huft *p, *q, *r;
inflate_huft *p, *q, *r;
/* Reverse linked list */
p = Z_NULL;

View File

@ -587,7 +587,7 @@ octo_null_md5_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
uint64_t *data;
uint64_t tmp1, tmp2;
int data_i, data_l, alen = auth_len;
@ -689,7 +689,7 @@ octo_null_sha1_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
uint64_t *data;
uint64_t tmp1, tmp2, tmp3;
int data_i, data_l, alen = auth_len;
@ -794,7 +794,7 @@ octo_des_cbc_md5_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -942,7 +942,7 @@ octo_des_cbc_md5_decrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1093,7 +1093,7 @@ octo_des_cbc_sha1_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1244,7 +1244,7 @@ octo_des_cbc_sha1_decrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1397,7 +1397,7 @@ octo_aes_cbc_md5_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1574,7 +1574,7 @@ octo_aes_cbc_md5_decrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1750,7 +1750,7 @@ octo_aes_cbc_sha1_encrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];
@ -1946,7 +1946,7 @@ octo_aes_cbc_sha1_decrypt(
int crypt_off, int crypt_len,
int icv_off, uint8_t *ivp)
{
register int next = 0;
int next = 0;
union {
uint32_t data32[2];
uint64_t data64[1];

View File

@ -98,10 +98,9 @@ __FBSDID("$FreeBSD$");
* ready to run and return to user mode.
*/
void
cpu_fork(register struct thread *td1,register struct proc *p2,
struct thread *td2,int flags)
cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2,int flags)
{
register struct proc *p1;
struct proc *p1;
struct pcb *pcb2;
p1 = td1->td_proc;

View File

@ -150,7 +150,7 @@
#define RIO_STATS /* collect statistics */
#define TV_DELTA(a, b, delta) { \
register int xxs; \
int xxs; \
\
delta = (a)->tv_usec - (b)->tv_usec; \
if ((xxs = (a)->tv_sec - (b)->tv_sec) != 0) { \

View File

@ -77,7 +77,7 @@ struct red;
(((a)->tv_usec < (b)->tv_usec) && ((a)->tv_sec <= (b)->tv_sec)))
#define TV_DELTA(a, b, delta) { \
register int xxs; \
int xxs; \
\
delta = (a)->tv_usec - (b)->tv_usec; \
if ((xxs = (a)->tv_sec - (b)->tv_sec)) { \
@ -98,7 +98,7 @@ struct red;
}
#define TV_ADD_DELTA(a, delta, res) { \
register int xxus = (a)->tv_usec + (delta); \
int xxus = (a)->tv_usec + (delta); \
\
(res)->tv_sec = (a)->tv_sec; \
while (xxus >= 1000000) { \

View File

@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
#ifdef _KERNEL
#define MINDEX(m, k) \
{ \
register int len = m->m_len; \
int len = m->m_len; \
\
while (k >= len) { \
k -= len; \
@ -341,7 +341,7 @@ bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen)
k = pc->k;
if (k >= buflen) {
#ifdef _KERNEL
register struct mbuf *m;
struct mbuf *m;
if (buflen != 0)
return (0);
@ -549,8 +549,8 @@ static const u_short bpf_code_map[] = {
int
bpf_validate(const struct bpf_insn *f, int len)
{
register int i;
register const struct bpf_insn *p;
int i;
const struct bpf_insn *p;
/* Do not accept negative length filter. */
if (len < 0)
@ -572,7 +572,7 @@ bpf_validate(const struct bpf_insn *f, int len)
* the code block.
*/
if (BPF_CLASS(p->code) == BPF_JMP) {
register u_int offset;
u_int offset;
if (p->code == (BPF_JMP|BPF_JA))
offset = p->k;

View File

@ -534,7 +534,7 @@ lltable_drain(int af)
{
struct lltable *llt;
struct llentry *lle;
register int i;
int i;
LLTABLE_LIST_RLOCK();
SLIST_FOREACH(llt, &V_lltables, llt_link) {

View File

@ -121,7 +121,7 @@ ifmedia_add(ifm, mword, data, aux)
int data;
void *aux;
{
register struct ifmedia_entry *entry;
struct ifmedia_entry *entry;
#ifdef IFMEDIA_DEBUG
if (ifmedia_debug) {

View File

@ -60,12 +60,10 @@
#define BCOPY(p1, p2, n) bcopy((void *)(p1), (void *)(p2), (int)(n))
void
sl_compress_init(comp, max_state)
struct slcompress *comp;
int max_state;
sl_compress_init(struct slcompress *comp, int max_state)
{
register u_int i;
register struct cstate *tstate = comp->tstate;
u_int i;
struct cstate *tstate = comp->tstate;
if (max_state == -1) {
max_state = MAX_STATES - 1;
@ -152,20 +150,17 @@ sl_compress_init(comp, max_state)
* if m is an M_PKTHDR mbuf.
*/
u_int
sl_compress_tcp(m, ip, comp, compress_cid)
struct mbuf *m;
register struct ip *ip;
struct slcompress *comp;
int compress_cid;
sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
int compress_cid)
{
register struct cstate *cs = comp->last_cs->cs_next;
register u_int hlen = ip->ip_hl;
register struct tcphdr *oth;
register struct tcphdr *th;
register u_int deltaS, deltaA;
register u_int changes = 0;
struct cstate *cs = comp->last_cs->cs_next;
u_int hlen = ip->ip_hl;
struct tcphdr *oth;
struct tcphdr *th;
u_int deltaS, deltaA;
u_int changes = 0;
u_char new_seq[16];
register u_char *cp = new_seq;
u_char *cp = new_seq;
/*
* Bail if this is an IP fragment or if the TCP packet isn't
@ -202,8 +197,8 @@ sl_compress_tcp(m, ip, comp, compress_cid)
* states via linear search. If we don't find a state
* for the datagram, the oldest state is (re-)used.
*/
register struct cstate *lcs;
register struct cstate *lastcs = comp->last_cs;
struct cstate *lcs;
struct cstate *lastcs = comp->last_cs;
do {
lcs = cs; cs = cs->cs_next;
@ -412,11 +407,7 @@ sl_compress_tcp(m, ip, comp, compress_cid)
int
sl_uncompress_tcp(bufp, len, type, comp)
u_char **bufp;
int len;
u_int type;
struct slcompress *comp;
sl_uncompress_tcp(u_char **bufp, int len, u_int type, struct slcompress *comp)
{
u_char *hdr, *cp;
int hlen, vjlen;
@ -460,21 +451,16 @@ sl_uncompress_tcp(bufp, len, type, comp)
* in *hdrp and its length in *hlenp.
*/
int
sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
u_char *buf;
int buflen, total_len;
u_int type;
struct slcompress *comp;
u_char **hdrp;
u_int *hlenp;
sl_uncompress_tcp_core(u_char *buf, int buflen, int total_len, u_int type,
struct slcompress *comp, u_char **hdrp, u_int *hlenp)
{
register u_char *cp;
register u_int hlen, changes;
register struct tcphdr *th;
register struct cstate *cs;
register struct ip *ip;
register u_int16_t *bp;
register u_int vjlen;
u_char *cp;
u_int hlen, changes;
struct tcphdr *th;
struct cstate *cs;
struct ip *ip;
u_int16_t *bp;
u_int vjlen;
switch (type) {
@ -542,7 +528,7 @@ sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp)
switch (changes & SPECIALS_MASK) {
case SPECIAL_I:
{
register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
th->th_ack = htonl(ntohl(th->th_ack) + i);
th->th_seq = htonl(ntohl(th->th_seq) + i);
}

View File

@ -96,8 +96,8 @@ int
in_localaddr(struct in_addr in)
{
struct rm_priotracker in_ifa_tracker;
register u_long i = ntohl(in.s_addr);
register struct in_ifaddr *ia;
u_long i = ntohl(in.s_addr);
struct in_ifaddr *ia;
IN_IFADDR_RLOCK(&in_ifa_tracker);
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
@ -187,8 +187,8 @@ in_localip_more(struct in_ifaddr *ia)
int
in_canforward(struct in_addr in)
{
register u_long i = ntohl(in.s_addr);
register u_long net;
u_long i = ntohl(in.s_addr);
u_long net;
if (IN_EXPERIMENTAL(i) || IN_MULTICAST(i) || IN_LINKLOCAL(i))
return (0);
@ -206,8 +206,8 @@ in_canforward(struct in_addr in)
static void
in_socktrim(struct sockaddr_in *ap)
{
register char *cplim = (char *) &ap->sin_addr;
register char *cp = (char *) (&ap->sin_addr + 1);
char *cplim = (char *) &ap->sin_addr;
char *cp = (char *) (&ap->sin_addr + 1);
ap->sin_len = 0;
while (--cp >= cplim)
@ -962,7 +962,7 @@ in_ifaddr_broadcast(struct in_addr in, struct in_ifaddr *ia)
int
in_broadcast(struct in_addr in, struct ifnet *ifp)
{
register struct ifaddr *ifa;
struct ifaddr *ifa;
int found;
if (in.s_addr == INADDR_BROADCAST ||

View File

@ -48,9 +48,9 @@ __FBSDID("$FreeBSD$");
int
in_cksum(struct mbuf *m, int len)
{
register u_short *w;
register int sum = 0;
register int mlen = 0;
u_short *w;
int sum = 0;
int mlen = 0;
int byte_swapped = 0;
union {

View File

@ -185,10 +185,10 @@ kmod_icmpstat_inc(int statnum)
void
icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu)
{
register struct ip *oip = mtod(n, struct ip *), *nip;
register unsigned oiphlen = oip->ip_hl << 2;
register struct icmp *icp;
register struct mbuf *m;
struct ip *oip = mtod(n, struct ip *), *nip;
unsigned oiphlen = oip->ip_hl << 2;
struct icmp *icp;
struct mbuf *m;
unsigned icmplen, icmpelen, nlen;
KASSERT((u_int)type <= ICMP_MAXTYPE, ("%s: illegal ICMP type", __func__));
@ -814,7 +814,7 @@ icmp_reflect(struct mbuf *m)
ip->ip_ttl = V_ip_defttl;
if (optlen > 0) {
register u_char *cp;
u_char *cp;
int opt, cnt;
u_int len;
@ -889,9 +889,9 @@ icmp_reflect(struct mbuf *m)
static void
icmp_send(struct mbuf *m, struct mbuf *opts)
{
register struct ip *ip = mtod(m, struct ip *);
register int hlen;
register struct icmp *icp;
struct ip *ip = mtod(m, struct ip *);
int hlen;
struct icmp *icp;
hlen = ip->ip_hl << 2;
m->m_data += hlen;

View File

@ -113,7 +113,7 @@ static struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *,
struct in6_addr *, u_int, struct in6_addr *, u_int, int, struct ifnet *);
int
in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
in6_pcbbind(struct inpcb *inp, struct sockaddr *nam,
struct ucred *cred)
{
struct socket *so = inp->inp_socket;
@ -324,10 +324,10 @@ in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam,
* have forced minor changes in every protocol).
*/
static int
in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam,
in6_pcbladdr(struct inpcb *inp, struct sockaddr *nam,
struct in6_addr *plocal_addr6)
{
register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam;
int error = 0;
int scope_ambiguous = 0;
struct in6_addr in6a;
@ -389,11 +389,11 @@ in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam,
* then pick one.
*/
int
in6_pcbconnect_mbuf(register struct inpcb *inp, struct sockaddr *nam,
in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam,
struct ucred *cred, struct mbuf *m)
{
struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam;
struct in6_addr addr6;
int error;
@ -494,7 +494,7 @@ in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p)
int
in6_getsockaddr(struct socket *so, struct sockaddr **nam)
{
register struct inpcb *inp;
struct inpcb *inp;
struct in6_addr addr;
in_port_t port;
@ -687,7 +687,7 @@ struct inpcb *
in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr,
u_short lport, int lookupflags, struct ucred *cred)
{
register struct inpcb *inp;
struct inpcb *inp;
int matchwild = 3, wildcard;
KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0,

View File

@ -158,8 +158,8 @@ rip6_input(struct mbuf **mp, int *offp, int proto)
{
struct ifnet *ifp;
struct mbuf *m = *mp;
register struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
register struct inpcb *in6p;
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
struct inpcb *in6p;
struct inpcb *last = NULL;
struct mbuf *opts = NULL;
struct sockaddr_in6 fromsa;

View File

@ -168,8 +168,8 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
caddr_t
m_pad(struct mbuf *m, int n)
{
register struct mbuf *m0, *m1;
register int len, pad;
struct mbuf *m0, *m1;
int len, pad;
caddr_t retval;
if (n <= 0) { /* No stupid arguments. */

View File

@ -529,7 +529,7 @@ extern CLIENT *clnt_tli_create(const int, const struct netconfig *,
struct netbuf *, const rpcprog_t,
const rpcvers_t, const u_int, const u_int);
/*
* const register int fd; -- fd
* const int fd; -- fd
* const struct netconfig *nconf; -- netconfig structure
* struct netbuf *svcaddr; -- servers address
* const u_long prog; -- program number

View File

@ -71,8 +71,8 @@ extern void *dpcpu0;
struct pcb;
struct pcpu;
register struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
#define get_pcpu() (pcpup)
#define PCPU_GET(member) (pcpup->pc_ ## member)