diff options
Diffstat (limited to 'sys/kern/sysv_sem.c')
-rw-r--r-- | sys/kern/sysv_sem.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 737ddba..f27d167 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -185,12 +185,12 @@ seminit(void) TUNABLE_INT_FETCH("kern.ipc.semvmx", &seminfo.semvmx); TUNABLE_INT_FETCH("kern.ipc.semaem", &seminfo.semaem); - sem = malloc(sizeof(struct sem) * seminfo.semmns, M_SEM, M_WAITOK); + sem = malloc(sizeof(struct sem) * seminfo.semmns, M_SEM, 0); sema = malloc(sizeof(struct semid_ds) * seminfo.semmni, M_SEM, - M_WAITOK); + 0); sema_mtx = malloc(sizeof(struct mtx) * seminfo.semmni, M_SEM, - M_WAITOK | M_ZERO); - semu = malloc(seminfo.semmnu * seminfo.semusz, M_SEM, M_WAITOK); + M_ZERO); + semu = malloc(seminfo.semmnu * seminfo.semusz, M_SEM, 0); for (i = 0; i < seminfo.semmni; i++) { sema[i].sem_base = 0; @@ -644,7 +644,7 @@ __semctl(td, uap) if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0) goto done2; array = malloc(sizeof(*array) * semaptr->sem_nsems, M_TEMP, - M_WAITOK); + 0); mtx_lock(sema_mtxp); if ((error = semvalid(uap->semid, semaptr)) != 0) goto done2; @@ -702,7 +702,7 @@ raced: mtx_unlock(sema_mtxp); if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0) goto done2; - array = malloc(sizeof(*array) * count, M_TEMP, M_WAITOK); + array = malloc(sizeof(*array) * count, M_TEMP, 0); copyin(real_arg.array, array, count * sizeof(*array)); if (error) break; @@ -897,7 +897,7 @@ semop(td, uap) nsops)); return (E2BIG); } - sops = malloc(nsops * sizeof(sops[0]), M_SEM, M_WAITOK); + sops = malloc(nsops * sizeof(sops[0]), M_SEM, 0); if ((error = copyin(uap->sops, sops, nsops * sizeof(sops[0]))) != 0) { DPRINTF(("error = %d from copyin(%08x, %08x, %d)\n", error, uap->sops, sops, nsops * sizeof(sops[0]))); |