From owner-cvs-all@FreeBSD.ORG Mon Jan 19 07:00:59 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0998216A4CE; Mon, 19 Jan 2004 07:00:59 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3974643D62; Mon, 19 Jan 2004 07:00:58 -0800 (PST) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0JF0w0B040952; Mon, 19 Jan 2004 07:00:58 -0800 (PST) (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0JF0vl7040951; Mon, 19 Jan 2004 07:00:57 -0800 (PST) (envelope-from mtm) Message-Id: <200401191500.i0JF0vl7040951@repoman.freebsd.org> From: Mike Makonnen Date: Mon, 19 Jan 2004 07:00:57 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_mutex.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 19 Jan 2004 15:00:59 -0000 mtm 2004/01/19 07:00:57 PST FreeBSD src repository Modified files: lib/libthr/thread thr_mutex.c Log: Refactor _pthread_mutex_init o Simplify the logic by removing a lot of unnecesary nesting o Reduce the amount of local variables o Zero-out the allocated structure and get rid of all the unnecessary setting to 0 and NULL; Refactor _pthread_mutex_destroy o Simplify the logic by removing a lot of unnecesary nesting o No need to check pointer that the mutex attributes points to. Checking passed in pointer is enough. Revision Changes Path 1.21 +68 -129 src/lib/libthr/thread/thr_mutex.c