From owner-svn-src-head@FreeBSD.ORG Sun Nov 30 19:30:32 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47D64106564A; Sun, 30 Nov 2008 19:30:32 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 376B98FC13; Sun, 30 Nov 2008 19:30:32 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAUJUV7j099584; Sun, 30 Nov 2008 19:30:31 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAUJUVRo099583; Sun, 30 Nov 2008 19:30:31 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <200811301930.mAUJUVRo099583@svn.freebsd.org> From: Jason Evans Date: Sun, 30 Nov 2008 19:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185483 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 19:30:32 -0000 Author: jasone Date: Sun Nov 30 19:30:31 2008 New Revision: 185483 URL: http://svn.freebsd.org/changeset/base/185483 Log: Adjust an assertion to handle the case where a lock is contested, but spinning is avoided due to running on a single-CPU system. Reported by: stefanf Modified: head/lib/libc/stdlib/malloc.c Modified: head/lib/libc/stdlib/malloc.c ============================================================================== --- head/lib/libc/stdlib/malloc.c Sun Nov 30 19:06:35 2008 (r185482) +++ head/lib/libc/stdlib/malloc.c Sun Nov 30 19:30:31 2008 (r185483) @@ -1284,7 +1284,7 @@ malloc_spin_lock(pthread_mutex_t *lock) * inversion. */ _pthread_mutex_lock(lock); - assert((ret << BLOCK_COST_2POW) != 0); + assert((ret << BLOCK_COST_2POW) != 0 || ncpus == 1); return (ret << BLOCK_COST_2POW); } }