int
rxi_AllocPackets(int class, int num_pkts, struct rx_queue * q)
{
- register struct rx_packet *p, *np;
+ struct rx_packet *p, *np;
num_pkts = AllocPacketBufs(class, num_pkts, q);
static int
AllocPacketBufs(int class, int num_pkts, struct rx_queue * q)
{
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
int transfer;
SPLVAR;
int
rxi_FreePackets(int num_pkts, struct rx_queue * q)
{
- register struct rx_ts_info_t * rx_ts_info;
- register struct rx_packet *c, *nc;
+ struct rx_ts_info_t * rx_ts_info;
+ struct rx_packet *c, *nc;
SPLVAR;
osi_Assert(num_pkts >= 0);
rxi_FreePackets(int num_pkts, struct rx_queue *q)
{
struct rx_queue cbs;
- register struct rx_packet *p, *np;
+ struct rx_packet *p, *np;
int qlen = 0;
SPLVAR;
{
int i, nv;
struct rx_queue q;
- register struct rx_packet *cb, *ncb;
+ struct rx_packet *cb, *ncb;
/* compute the number of cbuf's we need */
nv = nb / RX_CBUFFERSIZE;
rxi_MorePackets(int apackets)
{
struct rx_packet *p, *e;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
int getme;
SPLVAR;
rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local)
{
struct rx_packet *p, *e;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
int getme;
SPLVAR;
rxi_MorePacketsNoLock(int apackets)
{
#ifdef RX_ENABLE_TSFPQ
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
#endif /* RX_ENABLE_TSFPQ */
struct rx_packet *p, *e;
int getme;
void
rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit)
{
- register struct rx_ts_info_t * rx_ts_info;
- register int xfer;
+ struct rx_ts_info_t * rx_ts_info;
+ int xfer;
SPLVAR;
RX_TS_INFO_GET(rx_ts_info);
void
rxi_FreePacketNoLock(struct rx_packet *p)
{
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
dpf(("Free %lx\n", (unsigned long)p));
RX_TS_INFO_GET(rx_ts_info);
void
rxi_FreePacketTSFPQ(struct rx_packet *p, int flush_global)
{
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
dpf(("Free %lx\n", (unsigned long)p));
RX_TS_INFO_GET(rx_ts_info);
rxi_FreeDataBufsTSFPQ(struct rx_packet *p, afs_uint32 first, int flush_global)
{
struct iovec *iov;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
RX_TS_INFO_GET(rx_ts_info);
{
int length;
struct iovec *iov, *end;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_ts_info_t * rx_ts_info;
SPLVAR;
if (first != 1)
struct rx_packet *
rxi_AllocPacketNoLock(int class)
{
- register struct rx_packet *p;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_packet *p;
+ struct rx_ts_info_t * rx_ts_info;
RX_TS_INFO_GET(rx_ts_info);
struct rx_packet *
rxi_AllocPacketNoLock(int class)
{
- register struct rx_packet *p;
+ struct rx_packet *p;
#ifdef KERNEL
if (rxi_OverQuota(class)) {
struct rx_packet *
rxi_AllocPacketTSFPQ(int class, int pull_global)
{
- register struct rx_packet *p;
- register struct rx_ts_info_t * rx_ts_info;
+ struct rx_packet *p;
+ struct rx_ts_info_t * rx_ts_info;
RX_TS_INFO_GET(rx_ts_info);
struct rx_packet *
rxi_AllocPacket(int class)
{
- register struct rx_packet *p;
+ struct rx_packet *p;
p = rxi_AllocPacketTSFPQ(class, RX_TS_FPQ_PULL_GLOBAL);
return p;
struct rx_packet *
rxi_AllocPacket(int class)
{
- register struct rx_packet *p;
+ struct rx_packet *p;
MUTEX_ENTER(&rx_freePktQ_lock);
p = rxi_AllocPacketNoLock(class);
* Called with call locked.
*/
struct rx_packet *
-rxi_AllocSendPacket(register struct rx_call *call, int want)
+rxi_AllocSendPacket(struct rx_call *call, int want)
{
- register struct rx_packet *p = (struct rx_packet *)0;
- register int mud;
- register unsigned delta;
+ struct rx_packet *p = (struct rx_packet *)0;
+ int mud;
+ unsigned delta;
SPLVAR;
mud = call->MTU - RX_HEADER_SIZE;
#else
/* count the number of used FDs */
static int
-CountFDs(register int amax)
+CountFDs(int amax)
{
struct stat tstat;
- register int i, code;
- register int count;
+ int i, code;
+ int count;
count = 0;
for (i = 0; i < amax; i++) {
* the data length of the packet is stored in the packet structure.
* The header is decoded. */
int
-rxi_ReadPacket(osi_socket socket, register struct rx_packet *p, afs_uint32 * host,
+rxi_ReadPacket(osi_socket socket, struct rx_packet *p, afs_uint32 * host,
u_short * port)
{
struct sockaddr_in from;
int nbytes;
afs_int32 rlen;
- register afs_int32 tlen, savelen;
+ afs_int32 tlen, savelen;
struct msghdr msg;
rx_computelen(p, tlen);
rx_SetDataSize(p, tlen); /* this is the size of the user data area */
p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(*host), ntohs(*port), p->header.serial,
p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags,
p->length));
+#ifdef RX_TRIMDATABUFS
rxi_TrimDataBufs(p, 1);
+#endif
return 0;
}
#endif
}
}
+#ifdef RX_TRIMDATABUFS
/* Free any empty packet buffers at the end of this packet */
rxi_TrimDataBufs(p, 1);
-
+#endif
return 1;
}
}
* last two pad bytes. */
struct rx_packet *
-rxi_SplitJumboPacket(register struct rx_packet *p, afs_int32 host, short port,
+rxi_SplitJumboPacket(struct rx_packet *p, afs_int32 host, short port,
int first)
{
struct rx_packet *np;
* The message is NOT changed.
*/
static int
-cpytoc(mblk_t * mp, register int off, register int len, register char *cp)
+cpytoc(mblk_t * mp, int off, int len, char *cp)
{
- register int n;
+ int n;
for (; mp && len > 0; mp = mp->b_cont) {
if (mp->b_datap->db_type != M_DATA) {
* This sucks, anyway, do it like m_cpy.... below
*/
static int
-cpytoiovec(mblk_t * mp, int off, int len, register struct iovec *iovs,
+cpytoiovec(mblk_t * mp, int off, int len, struct iovec *iovs,
int niovs)
{
- register int m, n, o, t, i;
+ int m, n, o, t, i;
for (i = -1, t = 0; i < niovs && mp && len > 0; mp = mp->b_cont) {
if (mp->b_datap->db_type != M_DATA) {
struct rx_packet *phandle;
int hdr_len, data_len;
{
- register int code;
+ int code;
code =
m_cpytoiovec(amb, hdr_len, data_len, phandle->wirevec,
/* send a response to a debug packet */
struct rx_packet *
-rxi_ReceiveDebugPacket(register struct rx_packet *ap, osi_socket asocket,
+rxi_ReceiveDebugPacket(struct rx_packet *ap, osi_socket asocket,
afs_int32 ahost, short aport, int istack)
{
struct rx_debugIn tin;
case RX_DEBUGI_GETALLCONN:
case RX_DEBUGI_GETCONN:{
int i, j;
- register struct rx_connection *tc;
+ struct rx_connection *tc;
struct rx_call *tcall;
struct rx_debugConn tconn;
int all = (tin.type == RX_DEBUGI_GETALLCONN);
case RX_DEBUGI_GETPEER:{
int i;
- register struct rx_peer *tp;
+ struct rx_peer *tp;
struct rx_debugPeer tpeer;
}
struct rx_packet *
-rxi_ReceiveVersionPacket(register struct rx_packet *ap, osi_socket asocket,
+rxi_ReceiveVersionPacket(struct rx_packet *ap, osi_socket asocket,
afs_int32 ahost, short aport, int istack)
{
afs_int32 tl;
#endif
int code;
struct sockaddr_in addr;
- register struct rx_peer *peer = conn->peer;
+ struct rx_peer *peer = conn->peer;
osi_socket socket;
#ifdef RXDEBUG
char deliveryType = 'S';
int waslocked;
#endif
struct sockaddr_in addr;
- register struct rx_peer *peer = conn->peer;
+ struct rx_peer *peer = conn->peer;
osi_socket socket;
struct rx_packet *p = NULL;
struct iovec wirevec[RX_MAXIOVECS];
* in rx.h. Bug: there's a lot of duplication between this and other
* routines. This needs to be cleaned up. */
struct rx_packet *
-rxi_SendSpecial(register struct rx_call *call,
- register struct rx_connection *conn,
+rxi_SendSpecial(struct rx_call *call,
+ struct rx_connection *conn,
struct rx_packet *optionalPacket, int type, char *data,
int nbytes, int istack)
{
/* Some of the following stuff should be common code for all
* packet sends (it's repeated elsewhere) */
- register struct rx_packet *p;
+ struct rx_packet *p;
unsigned int i = 0;
int savelen = 0, saven = 0;
int channel, callNumber;
* the net byte order representation in the wire representation of the
* packet, which is what is actually sent out on the wire) */
void
-rxi_EncodePacketHeader(register struct rx_packet *p)
+rxi_EncodePacketHeader(struct rx_packet *p)
{
- register afs_uint32 *buf = (afs_uint32 *) (p->wirevec[0].iov_base); /* MTUXXX */
+ afs_uint32 *buf = (afs_uint32 *) (p->wirevec[0].iov_base); /* MTUXXX */
memset((char *)buf, 0, RX_HEADER_SIZE);
*buf++ = htonl(p->header.epoch);
/* Decode the packet's header (from net byte order to a struct header) */
void
-rxi_DecodePacketHeader(register struct rx_packet *p)
+rxi_DecodePacketHeader(struct rx_packet *p)
{
- register afs_uint32 *buf = (afs_uint32 *) (p->wirevec[0].iov_base); /* MTUXXX */
+ afs_uint32 *buf = (afs_uint32 *) (p->wirevec[0].iov_base); /* MTUXXX */
afs_uint32 temp;
p->header.epoch = ntohl(*buf);
}
void
-rxi_PrepareSendPacket(register struct rx_call *call,
- register struct rx_packet *p, register int last)
+rxi_PrepareSendPacket(struct rx_call *call,
+ struct rx_packet *p, int last)
{
- register struct rx_connection *conn = call->conn;
+ struct rx_connection *conn = call->conn;
int i;
ssize_t len; /* len must be a signed type; it can go negative */