SCCS-vsn: sys/sys/mbuf.h 4.2
SCCS-vsn: sys/sys/socket.h 4.2
SCCS-vsn: sys/vax/uba/ubareg.h 4.23
SCCS-vsn: sys/vax/uba/ubavar.h 4.20
-/* mbuf.h 4.1 81/10/29 */
+/* mbuf.h 4.2 81/10/29 */
/*
* Constants related to memory allocator.
/*
* Constants related to memory allocator.
struct mbuf *m_get(), *m_free(), *m_more();
#define MGET(m, i) \
struct mbuf *m_get(), *m_free(), *m_more();
#define MGET(m, i) \
- { int ms = spl_imp(); \
- { netcb.n_bufs--; mfree = (m)->m_next; (m)->m_next = 0; } \
+ { mbstat.m_bufs--; mfree = (m)->m_next; (m)->m_next = 0; } \
else \
(m) = m_more(i); \
splx(ms); }
#define MPGET(m, i) \
else \
(m) = m_more(i); \
splx(ms); }
#define MPGET(m, i) \
- { int ms = spl_imp(); \
if ((m)=mpfree) \
{ ++mprefcnt[mtopf(m)]; nmpfree--; mpfree = (m)->m_next; } \
splx(ms); }
#define MFREE(m, n) \
if ((m)=mpfree) \
{ ++mprefcnt[mtopf(m)]; nmpfree--; mpfree = (m)->m_next; } \
splx(ms); }
#define MFREE(m, n) \
- { int ms = spl_imp(); \
if ((m)->m_off > MSIZE) { \
(n) = (struct mbuf *)(mtod(m, int)&~0x3ff); \
if (--mprefcnt[mtopf(n)] == 0) \
{ (n)->m_next = mpfree; mpfree = (n); nmpfree++; } \
} \
(n) = (m)->m_next; (m)->m_next = mfree; \
if ((m)->m_off > MSIZE) { \
(n) = (struct mbuf *)(mtod(m, int)&~0x3ff); \
if (--mprefcnt[mtopf(n)] == 0) \
{ (n)->m_next = mpfree; mpfree = (n); nmpfree++; } \
} \
(n) = (m)->m_next; (m)->m_next = mfree; \
- (m)->m_off = 0; (m)->m_act = 0; mfree = (m); netcb.n_bufs++; \
+ (m)->m_off = 0; (m)->m_act = 0; mfree = (m); mbstat.m_bufs++; \
splx(ms); }
#define NMBPG (PGSIZE/MSIZE) /* mbufs/page */
splx(ms); }
#define NMBPG (PGSIZE/MSIZE) /* mbufs/page */
+struct mbstat {
+ short m_bufs; /* # free msg buffers */
+ short m_hiwat; /* # free mbufs allocated */
+ short m_lowat; /* min. # free mbufs */
+ short m_pages; /* # pages owned by network */
+};
+
#ifdef KERNEL
extern struct mbuf netutl[]; /* virtual address of net free mem */
extern struct pte Netmap[]; /* page tables to map Netutl */
#ifdef KERNEL
extern struct mbuf netutl[]; /* virtual address of net free mem */
extern struct pte Netmap[]; /* page tables to map Netutl */
- short n_bufs; /* # free msg buffers */
- short n_hiwat; /* # free mbufs allocated */
- short n_lowat; /* min. # free mbufs */
- short n_pages; /* # pages owned by network */
-/* socket.h 4.1 81/10/29 */
+/* socket.h 4.2 81/10/29 */
/*
* User connection block
/*
* User connection block
-/* ubareg.h 4.22 81/04/03 */
+/* ubareg.h 4.23 81/10/29 */
/*
* VAX UNIBUS adapter registers
/*
* VAX UNIBUS adapter registers
#define UBADPR_DPF 0x20000000 /* DP function (RO) */
#define UBADPR_BS 0x007f0000 /* buffer state field */
#define UBADPR_BUBA 0x0000ffff /* buffered UNIBUS address */
#define UBADPR_DPF 0x20000000 /* DP function (RO) */
#define UBADPR_BS 0x007f0000 /* buffer state field */
#define UBADPR_BUBA 0x0000ffff /* buffered UNIBUS address */
+#define UBA_PURGE780(uba, bdp) \
+ ((uba)->uba_dpr[bdp] |= UBADPR_BNE)
#endif VAX780
#if VAX750
#define UBADPR_ERROR 0x80000000 /* error occurred */
#define UBADPR_NXM 0x40000000 /* nxm from memory */
#define UBADPR_UCE 0x20000000 /* uncorrectable error */
#define UBADPR_PURGE 0x00000001 /* purge bdp */
#endif VAX780
#if VAX750
#define UBADPR_ERROR 0x80000000 /* error occurred */
#define UBADPR_NXM 0x40000000 /* nxm from memory */
#define UBADPR_UCE 0x20000000 /* uncorrectable error */
#define UBADPR_PURGE 0x00000001 /* purge bdp */
+#define UBA_PURGE750(uba, bdp) \
+ ((uba)->uba_dpr[bdp] |= (UBADPR_PURGE|UBADPR_NXM|UBADPR_UCE))
#endif VAX750
/* uba_mr[] */
#endif VAX750
/* uba_mr[] */
-/* ubavar.h 4.19 81/08/31 */
+/* ubavar.h 4.20 81/10/29 */
/*
* This file contains definitions related to the kernel structures
/*
* This file contains definitions related to the kernel structures
/*
* Flags to UBA map/bdp allocation routines
*/
/*
* Flags to UBA map/bdp allocation routines
*/
-#define UBA_NEEDBDP 1 /* transfer needs a bdp */
-#define UBA_CANTWAIT 2 /* don't block me */
-#define UBA_NEED16 3 /* need 16 bit addresses only */
+#define UBA_NEEDBDP 0x1 /* transfer needs a bdp */
+#define UBA_CANTWAIT 0x2 /* don't block me */
+#define UBA_NEED16 0x4 /* need 16 bit addresses only */
#ifndef LOCORE
#ifdef KERNEL
#ifndef LOCORE
#ifdef KERNEL