diff options
author | 2009-09-29 17:26:09 +0000 | |
---|---|---|
committer | 2009-09-29 17:26:09 +0000 | |
commit | d8037399b72d04c12cc347d5de563da628ee2579 (patch) | |
tree | 44a305f88e82668423bc9fe106c5bce165cddb6c /sys | |
parent | sync (diff) | |
download | wireguard-openbsd-d8037399b72d04c12cc347d5de563da628ee2579.tar.xz wireguard-openbsd-d8037399b72d04c12cc347d5de563da628ee2579.zip |
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')
-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); } |