From owner-cvs-all@FreeBSD.ORG Wed Sep 27 08:39:01 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org 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 4869916A580; Wed, 27 Sep 2006 08:39:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A46843D46; Wed, 27 Sep 2006 08:39:01 +0000 (GMT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8R8d0Hx053843; Wed, 27 Sep 2006 08:39:00 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8R8d0qO053842; Wed, 27 Sep 2006 08:39:00 GMT (envelope-from pjd) Message-Id: <200609270839.k8R8d0qO053842@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 27 Sep 2006 08:39:00 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/share/examples/mdoc example.9 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: Wed, 27 Sep 2006 08:39:01 -0000 pjd 2006-09-27 08:39:00 UTC FreeBSD src repository Modified files: share/examples/mdoc example.9 Log: - Use existing functions mtx_lock() and mtx_unlock(). - Change variable name to 'error', as this is what is mostly used for functions that return an error. - Add mutex(9) to the SEE ALSO section. - Bump the date. I don't really like the example code. I'd prefer symmetry where possible, eg. mtx_lock(&example_lock); error = example(NULL, EXAMPLE_ONE); mtx_unlock(&example_lock); if (error != 0) return (error); But I'll leave it as it is for now. Reviewed by: simon Revision Changes Path 1.4 +9 -8 src/share/examples/mdoc/example.9