summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sem.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/kern/uipc_sem.c
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/kern/uipc_sem.c')
-rw-r--r--sys/kern/uipc_sem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index 3d9d5b55..e3912e1 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -188,7 +188,7 @@ sem_create(td, name, ksret, mode, value)
uc = p->p_ucred;
if (value > SEM_VALUE_MAX)
return (EINVAL);
- ret = malloc(sizeof(*ret), M_SEM, M_ZERO);
+ ret = malloc(sizeof(*ret), M_SEM, M_WAITOK | M_ZERO);
if (name != NULL) {
len = strlen(name);
if (len > SEM_MAX_NAMELEN) {
@@ -200,7 +200,7 @@ sem_create(td, name, ksret, mode, value)
free(ret, M_SEM);
return (EINVAL);
}
- ret->ks_name = malloc(len + 1, M_SEM, 0);
+ ret->ks_name = malloc(len + 1, M_SEM, M_WAITOK);
strcpy(ret->ks_name, name);
} else {
ret->ks_name = NULL;
@@ -504,7 +504,7 @@ sem_enter(p, ks)
{
struct kuser *ku, *k;
- ku = malloc(sizeof(*ku), M_SEM, 0);
+ ku = malloc(sizeof(*ku), M_SEM, M_WAITOK);
ku->ku_pid = p->p_pid;
mtx_lock(&sem_lock);
k = sem_getuser(p, ks);
OpenPOWER on IntegriCloud