PERFORCE change 143260 for review

Julian Elischer julian at FreeBSD.org
Tue Jun 10 21:11:49 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143260

Change 143260 by julian at julian_trafmon1 on 2008/06/10 21:11:16

	 IFC at 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);
 }


More information about the p4-projects mailing list