From owner-cvs-all@FreeBSD.ORG Thu Jun 26 17:17:09 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938511065674; Thu, 26 Jun 2008 17:17:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2D48FC19; Thu, 26 Jun 2008 17:17:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m5QHH26T076005; Thu, 26 Jun 2008 13:17:03 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 26 Jun 2008 10:46:34 -0400 User-Agent: KMail/1.9.7 References: <200806261351.m5QDpjda006584@repoman.freebsd.org> In-Reply-To: <200806261351.m5QDpjda006584@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806261046.34932.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 26 Jun 2008 13:17:03 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7572/Thu Jun 26 12:25:12 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys semaphore.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 17:17:09 -0000 On Thursday 26 June 2008 09:51:25 am John Baldwin wrote: > jhb 2008-06-26 13:51:25 UTC > > FreeBSD src repository > > Modified files: > sys/sys semaphore.h > Log: > SVN rev 180032 on 2008-06-26 13:51:25Z by jhb > > Change SEM_VALUE_MAX (maximum value of a POSIX semaphore) from UINT_MAX > to INT_MAX. Otherwise, a process could create a semaphore (or increase > its value via ksem_post()) beyond INT_MAX and sem_getvalue() would return > a negative value. sem_getvalue() is only supposed to return a negative > value if that is the number of waiters for that semaphore. > > MFC after: 2 weeks Forgot to mention that other OS's I checked (glibc, Windows) use signed max constants (INT_MAX, LONG_MAX) rather than the unsigned constant. Probably for the same reason. -- John Baldwin