/* subr_xxx.c 4.21 82/12/17 */
#include "../machine/pte.h"
* Routine placed in illegal entries in the bdevsw and cdevsw tables.
* Null routine; placed in insignificant entries
* in the bdevsw and cdevsw tables.
extern struct pte camap
[];
caddr_t cacur
= (caddr_t
)&cabase
;
caddr_t camax
= (caddr_t
)&cabase
;
* This is a kernel-mode storage allocator.
* It is very primitive, currently, in that
* there is no way to give space back.
* It serves, for the time being, the needs of
* auto-configuration code and the like which
* need to allocate some stuff at boot time.
if (cacur
+size
>= (caddr_t
)&calimit
)
while (cacur
+size
> camax
) {
(void) vmemall(&camap
[cax
], CLSIZE
, &proc
[0], CSYS
);
vmaccess(&camap
[cax
], camax
, CLSIZE
);
for (i
= 0; i
< CLSIZE
; i
++)
clearseg(camap
[cax
++].pg_pfnum
);
for (len
= 0; *s1
++ != '\0'; len
++)
* Pass back c to the user.
register struct iovec
*iov
= uio
->uio_iov
;
switch (uio
->uio_segflg
) {
if (subyte(iov
->iov_base
, c
) < 0)
if (suibyte(iov
->iov_base
, c
) < 0)