From 1eaea0f36001fb9020bc14558a0a6376b119c5e5 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 29 Sep 2009 17:26:10 +0000 Subject: Having pty_isfree_locked() be inlined may make pty allocation a tiny bit faster, but come on, inlining is supposed to be reserved only for things which *critically* need it. ok millert --- sys/kern/tty_pty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index dc42c3198f3..f7f53412ca6 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.38 2008/08/02 11:39:38 stefan Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.39 2009/09/29 17:26:09 deraadt Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -985,10 +985,11 @@ sysctl_pty(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, /* * Check if a pty is free to use. */ -static __inline int +static int pty_isfree_locked(int minor) { struct pt_softc *pt = pt_softc[minor]; + return (pt == NULL || pt->pt_tty == NULL || pt->pt_tty->t_oproc == NULL); } -- cgit v1.2.3