diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-09-29 17:26:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-09-29 17:26:10 +0000 |
commit | 1eaea0f36001fb9020bc14558a0a6376b119c5e5 (patch) | |
tree | 807f2fed2d5396ee66703b8fdeea3afb052e474d /sys/kern | |
parent | 52fa30cdead2ffa2a11227070b5bc86bf5d5f2dc (diff) |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_pty.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |