From owner-freebsd-current@FreeBSD.ORG Fri Aug 10 13:39:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D943010656D1 for ; Fri, 10 Aug 2012 13:39:16 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF988FC18 for ; Fri, 10 Aug 2012 13:39:16 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id un3so3021567obb.13 for ; Fri, 10 Aug 2012 06:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=+1/84s4MVMa8dsP5fhpcmJjIrxY47Y4ypezZKIxu1WA=; b=UkAIY5S0d+3EMExlCE/rwU+DGGlLOT3zzzybWTkpqU490J3ZhU3yIKHdwY/IBDJnI6 F60UJuMY8s82UfaH8ALE2d+gaGmkcQWLtxaT/O8IaxTMfi0fzUGEYRi5OknMkczAn57U +kL2ln8/XiWKWIFF1285JxWCT2vYaiTDwF312JGMRjPbFMPx9hs2P0vqJUsju7S2ygKQ OxpiH8pNt5+kgsKVXX4q+IrPspb1Mvo3KzsAJGscbpmfbd1iax7rHdlfPg2Y7AteBG9l 9qF6lIdQ3sdGLKalq03gqZ8PJUUQ15gL/PZZwRKbOABv06fNzxnD1wMfQ1btzlqGioIi 40UQ== MIME-Version: 1.0 Received: by 10.60.19.34 with SMTP id b2mr4144132oee.41.1344605956473; Fri, 10 Aug 2012 06:39:16 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.173.197 with HTTP; Fri, 10 Aug 2012 06:39:16 -0700 (PDT) In-Reply-To: <201208090851.56972.hselasky@c2i.net> References: <20120801160323.GN2676@deviant.kiev.zoral.com.ua> <201208081941.17860.hselasky@c2i.net> <201208090851.56972.hselasky@c2i.net> Date: Fri, 10 Aug 2012 15:39:16 +0200 X-Google-Sender-Auth: ZNZmWTgPfcBjqt7O_afJJ0lqyx4 Message-ID: From: Ed Schouten To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , freebsd-current@freebsd.org Subject: Re: ttydev_cdevsw has no d_purge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2012 13:39:17 -0000 Hi Hans, 2012/8/9 Hans Petter Selasky : > 1) Use unrhdr. Suggested by ed. Thanks! > 2) Implement tty_set_softc() and use that when dereffing ucom unit numbers. We're getting there. Now that I think of it, if we want to go in this direction, we might as well do the following: - Simply call tty_alloc() -- not tty_alloc_mutex(). I'd rather get rid of this functionality altogether, if possible. - Use the TTY mutex to lock down the state of the ucom driver, e.g. #define ucom_lock(sc) tty_lock(sc->sc_mtx). Any thoughts? -- Ed Schouten