Date: Tue, 10 Jun 2008 21:11:48 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 143260 for review Message-ID: <200806102111.m5ALBmBG058531@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143260 Change 143260 by julian@julian_trafmon1 on 2008/06/10 21:11:16 IFC@143258 Affected files ... .. //depot/projects/vimage-commit2/src/sys/kern/uipc_sem.c#2 integrate Differences ... ==== //depot/projects/vimage-commit2/src/sys/kern/uipc_sem.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/uipc_sem.c,v 1.31 2008/05/16 18:10:07 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_sem.c,v 1.32 2008/06/10 20:55:10 gonzo Exp $"); #include "opt_mac.h" #include "opt_posix.h" @@ -221,14 +221,13 @@ sem_enter(td->td_proc, ret); *ksret = ret; mtx_lock(&sem_lock); - if (nsems >= p31b_getcfg(CTL_P1003_1B_SEM_NSEMS_MAX)) { + nsems++; + if (nsems > p31b_getcfg(CTL_P1003_1B_SEM_NSEMS_MAX)) { sem_leave(td->td_proc, ret); sem_free(ret); error = ENFILE; - } else { - nsems++; + } else error = 0; - } mtx_unlock(&sem_lock); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806102111.m5ALBmBG058531>