From owner-cvs-all@FreeBSD.ORG Wed Jun 9 09:42:04 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 9CC7C16A4CE; Wed, 9 Jun 2004 09:42:04 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DF3143D60; Wed, 9 Jun 2004 09:42:04 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i599fVXV068888; Wed, 9 Jun 2004 09:41:31 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i599fUbQ068884; Wed, 9 Jun 2004 09:41:30 GMT (envelope-from phk) Message-Id: <200406090941.i599fUbQ068884@repoman.freebsd.org> From: Poul-Henning Kamp Date: Wed, 9 Jun 2004 09:41:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/sys tty.h src/sys/kern kern_proc.c tty.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: Wed, 09 Jun 2004 09:42:04 -0000 phk 2004-06-09 09:41:30 UTC FreeBSD src repository Modified files: sys/sys tty.h sys/kern kern_proc.c tty.c Log: Reference count struct tty. Add two new functions: ttyref() and ttyrel(). ttymalloc() creates a struct tty with a reference count of one. when ttyrel sees the count go to zero, struct tty is freed. Hold references for open ttys and for ttys which are controlling terminal for sessions. Until drivers start using ttyrel(), this commit will make no difference. Revision Changes Path 1.205 +3 -1 src/sys/kern/kern_proc.c 1.217 +93 -21 src/sys/kern/tty.c 1.79 +8 -2 src/sys/sys/tty.h