Enable ttymalloc().

This commit is contained in:
Poul-Henning Kamp 1999-08-08 20:24:58 +00:00
parent 61ec30585f
commit 7517504c24
2 changed files with 8 additions and 11 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
* $Id: tty.c,v 1.119 1999/05/22 20:10:31 dt Exp $
* $Id: tty.c,v 1.120 1999/08/08 19:47:31 phk Exp $
*/
/*-
@ -2407,25 +2407,22 @@ ttysleep(tp, chan, pri, wmesg, timo)
return (tp->t_gen == gen ? 0 : ERESTART);
}
#ifdef notyet
/*
* XXX this is usable not useful or used. Most tty drivers have
* ifdefs for using ttymalloc() but assume a different interface.
*/
/*
* Allocate a tty struct. Clists in the struct will be allocated by
* ttyopen().
*/
struct tty *
ttymalloc()
ttymalloc(tp)
struct tty *tp;
{
struct tty *tp;
if (tp)
return(tp);
tp = malloc(sizeof *tp, M_TTYS, M_WAITOK);
bzero(tp, sizeof *tp);
ttyregister(tp);
return (tp);
}
#endif
#if 0 /* XXX not yet usable: session leader holds a ref (see kern_exit.c). */
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.h 8.6 (Berkeley) 1/21/94
* $Id: tty.h,v 1.44 1998/11/11 10:56:07 truckman Exp $
* $Id: tty.h,v 1.45 1999/08/08 19:47:26 phk Exp $
*/
#ifndef _SYS_TTY_H_
@ -268,7 +268,7 @@ void ttyregister __P((struct tty *tp));
int ttysleep __P((struct tty *tp,
void *chan, int pri, char *wmesg, int timeout));
int ttywait __P((struct tty *tp));
struct tty *ttymalloc __P((void));
struct tty *ttymalloc __P((struct tty *tp));
void ttyfree __P((struct tty *));
#endif /* KERNEL */