summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committeralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commitbf8e8a6e8f0bd9165109f0a258730dd242299815 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/compat
parent2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff)
downloadFreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip
FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c10
-rw-r--r--sys/compat/linux/linux_file.c2
-rw-r--r--sys/compat/linux/linux_getcwd.c4
-rw-r--r--sys/compat/linux/linux_ioctl.c2
-rw-r--r--sys/compat/linux/linux_mib.c2
-rw-r--r--sys/compat/linux/linux_sysctl.c2
-rw-r--r--sys/compat/linux/linux_util.c2
-rw-r--r--sys/compat/pecoff/imgact_pecoff.c12
-rw-r--r--sys/compat/svr4/svr4_filio.c2
-rw-r--r--sys/compat/svr4/svr4_misc.c4
-rw-r--r--sys/compat/svr4/svr4_socket.c2
-rw-r--r--sys/compat/svr4/svr4_stream.c8
-rw-r--r--sys/compat/svr4/svr4_sysvec.c2
13 files changed, 27 insertions, 27 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 10eb642..8b707b4 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -106,7 +106,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
@@ -769,8 +769,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
@@ -815,8 +815,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 2b37dcd..160b2a9 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -297,7 +297,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args,
buflen = max(LINUX_DIRBLKSIZ, nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index bb1c28f..81e84a3 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -181,7 +181,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td)
dirbuflen = DIRBLKSIZ;
if (dirbuflen < va.va_blocksize)
dirbuflen = va.va_blocksize;
- dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK);
+ dirbuf = (char *)malloc(dirbuflen, M_TEMP, 0);
#if 0
unionread:
@@ -429,7 +429,7 @@ linux_getcwd(struct thread *td, struct linux_getcwd_args *args)
else if (len < 2)
return ERANGE;
- path = (char *)malloc(len, M_TEMP, M_WAITOK);
+ path = (char *)malloc(len, M_TEMP, 0);
error = kern___getcwd(td, path, UIO_SYSSPACE, len);
if (!error) {
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 9f10ba5..eb1b974 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -2420,7 +2420,7 @@ linux_ioctl_register_handler(struct linux_ioctl_handler *h)
}
if (he == NULL) {
MALLOC(he, struct handler_element *, sizeof(*he),
- M_LINUX, M_WAITOK);
+ M_LINUX, 0);
he->func = h->func;
} else
TAILQ_REMOVE(&handlers, he, list);
diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c
index d9cdd07..4f7f199 100644
--- a/sys/compat/linux/linux_mib.c
+++ b/sys/compat/linux/linux_mib.c
@@ -139,7 +139,7 @@ linux_get_prison(struct proc *p)
if (pr->pr_linux == NULL) {
mtx_unlock(&pr->pr_mtx);
MALLOC(lpr, struct linux_prison *, sizeof *lpr,
- M_PRISON, M_WAITOK|M_ZERO);
+ M_PRISON, M_ZERO);
mtx_lock(&pr->pr_mtx);
if (pr->pr_linux == NULL) {
pr->pr_linux = lpr;
diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c
index 699b5d6..d737f55 100644
--- a/sys/compat/linux/linux_sysctl.c
+++ b/sys/compat/linux/linux_sysctl.c
@@ -92,7 +92,7 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
if (la.nlen <= 0 || la.nlen > LINUX_CTL_MAXNAME)
return (ENOTDIR);
- mib = malloc(la.nlen * sizeof(l_int), M_TEMP, M_WAITOK);
+ mib = malloc(la.nlen * sizeof(l_int), M_TEMP, 0);
error = copyin(la.name, mib, la.nlen * sizeof(l_int));
if (error) {
free(mib, M_TEMP);
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 5bd8c15..bd2c81d 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -101,7 +101,7 @@ linux_emul_convpath(td, path, pathseg, pbuf, cflag)
char *ptr, *buf, *cp;
size_t len, sz;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = buf;
prefix = linux_emul_path;
diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c
index fd9ab26..b15e5c6 100644
--- a/sys/compat/pecoff/imgact_pecoff.c
+++ b/sys/compat/pecoff/imgact_pecoff.c
@@ -184,7 +184,7 @@ pecoff_coredump(register struct thread * td, register struct vnode * vp,
limit)
return (EFAULT);
tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (tempuser == NULL)
return (ENOMEM);
PROC_LOCK(p);
@@ -393,7 +393,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e
goto fail;
if ((error = pecoff_signature(td, imgp->vp, &dh) != 0))
goto fail;
- fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK);
+ fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0);
peofs = dh.d_peofs + sizeof(signature) - 1;
if ((error = pecoff_read_from(td, imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE) != 0))
goto fail;
@@ -405,7 +405,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e
wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr));
/* read section header */
scnsiz = sizeof(struct coff_scnhdr) * fp->f_nscns;
- sh = malloc(scnsiz, M_TEMP, M_WAITOK);
+ sh = malloc(scnsiz, M_TEMP, 0);
if ((error = pecoff_read_from(td, imgp->vp, peofs + PECOFF_HDR_SIZE,
(caddr_t) sh, scnsiz)) != 0)
goto fail;
@@ -481,7 +481,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp,
struct vmspace *vmspace;
struct pecoff_args *argp = NULL;
- sh = malloc(scnsiz, M_TEMP, M_WAITOK);
+ sh = malloc(scnsiz, M_TEMP, 0);
wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr));
error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc), imgp->vp,
@@ -529,7 +529,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp,
vmspace->vm_taddr = (caddr_t) (uintptr_t) text_addr;
vmspace->vm_dsize = data_size >> PAGE_SHIFT;
vmspace->vm_daddr = (caddr_t) (uintptr_t) data_addr;
- argp = malloc(sizeof(struct pecoff_args), M_TEMP, M_WAITOK);
+ argp = malloc(sizeof(struct pecoff_args), M_TEMP, 0);
if (argp == NULL) {
error = ENOMEM;
goto fail;
@@ -659,7 +659,7 @@ imgact_pecoff(struct image_params * imgp)
VOP_UNLOCK(imgp->vp, 0, td);
peofs = dp->d_peofs + sizeof(signature) - 1;
- fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK);
+ fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0);
error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc),
imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE);
if (error)
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c
index ca1b8db..ab98dce 100644
--- a/sys/compat/svr4/svr4_filio.c
+++ b/sys/compat/svr4/svr4_filio.c
@@ -68,7 +68,7 @@ svr4_sys_poll(td, uap)
pa.timeout = uap->timeout;
siz = uap->nfds * sizeof(struct pollfd);
- pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK);
+ pfd = (struct pollfd *)malloc(siz, M_TEMP, 0);
error = poll(td, (struct poll_args *)uap);
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 2db3c96..5938993 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -296,7 +296,7 @@ svr4_sys_getdents64(td, uap)
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
buflen = max(DIRBLKSIZ, nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
aiov.iov_base = buf;
@@ -459,7 +459,7 @@ svr4_sys_getdents(td, uap)
}
buflen = min(MAXBSIZE, uap->nbytes);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
off = fp->f_offset;
again:
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c
index b5da396..54274f9 100644
--- a/sys/compat/svr4/svr4_socket.c
+++ b/sys/compat/svr4/svr4_socket.c
@@ -138,7 +138,7 @@ svr4_add_socket(td, path, st)
atomic_store_rel_int(&svr4_str_initialized, 2);
}
- e = malloc(sizeof(*e), M_TEMP, M_WAITOK);
+ e = malloc(sizeof(*e), M_TEMP, 0);
e->cookie = NULL;
e->dev = st->st_dev;
e->ino = st->st_ino;
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index 9a5c465..6742009 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -212,7 +212,7 @@ svr4_sendit(td, s, mp, flags)
if (KTRPOINT(td, KTR_GENIO)) {
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
ktruio = auio;
}
@@ -297,7 +297,7 @@ svr4_recvit(td, s, mp, namelenp)
if (KTRPOINT(td, KTR_GENIO)) {
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
ktruio = auio;
}
@@ -408,7 +408,7 @@ show_ioc(str, ioc)
const char *str;
struct svr4_strioctl *ioc;
{
- u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, M_WAITOK);
+ u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, 0);
int error;
uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ",
@@ -444,7 +444,7 @@ show_strbuf(str)
len = maxlen;
if (len > 0) {
- ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK);
+ ptr = (u_char *) malloc(len, M_TEMP, 0);
if ((error = copyin(str->buf, ptr, len)) != 0) {
free((char *) ptr, M_TEMP);
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c
index 1d4ad6e..508e9dc 100644
--- a/sys/compat/svr4/svr4_sysvec.c
+++ b/sys/compat/svr4/svr4_sysvec.c
@@ -267,7 +267,7 @@ svr4_emul_find(td, sgp, prefix, path, pbuf, cflag)
char *ptr, *buf, *cp;
size_t sz, len;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
OpenPOWER on IntegriCloud