From owner-cvs-all@FreeBSD.ORG Tue Feb 21 18:37:40 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 B22A816A420; Tue, 21 Feb 2006 18:37:40 +0000 (GMT) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEB4343D68; Tue, 21 Feb 2006 18:37:35 +0000 (GMT) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1LIbZaG057508; Tue, 21 Feb 2006 18:37:35 GMT (envelope-from mux@repoman.freebsd.org) Received: (from mux@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1LIbZfl057507; Tue, 21 Feb 2006 18:37:35 GMT (envelope-from mux) Message-Id: <200602211837.k1LIbZfl057507@repoman.freebsd.org> From: Maxime Henrion Date: Tue, 21 Feb 2006 18:37:35 +0000 (UTC) To: projects-committers@FreeBSD.org, cvs-projects@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: projects/csup mux.c mux.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: Tue, 21 Feb 2006 18:37:41 -0000 mux 2006-02-21 18:37:35 UTC FreeBSD projects repository Modified files: csup mux.c mux.h Log: - Export the mux_shutdown() function for external use. - In mux_shutdown(), keep the multiplexer lock when printing error messages from the receiver or sender threads, in order to avoid unordered messages. - Also in mux_shutdown(), do not access m->sender or m->receiver when we don't own the lock. It should not be a problem since those are supposed to stay unchanged, but it's better style to copy them and use the copy when unlocked. And avoid determining which thread we are two times in a row. Revision Changes Path 1.67 +20 -19 projects/csup/mux.c 1.24 +2 -1 projects/csup/mux.h