diff options
Diffstat (limited to 'freebsd/sys/sys/ttydevsw.h')
-rw-r--r-- | freebsd/sys/sys/ttydevsw.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/freebsd/sys/sys/ttydevsw.h b/freebsd/sys/sys/ttydevsw.h index e2278c3a..748ae0be 100644 --- a/freebsd/sys/sys/ttydevsw.h +++ b/freebsd/sys/sys/ttydevsw.h @@ -46,10 +46,12 @@ typedef void tsw_outwakeup_t(struct tty *tp); typedef void tsw_inwakeup_t(struct tty *tp); typedef int tsw_ioctl_t(struct tty *tp, u_long cmd, caddr_t data, struct thread *td); +typedef int tsw_cioctl_t(struct tty *tp, int unit, u_long cmd, caddr_t data, + struct thread *td); typedef int tsw_param_t(struct tty *tp, struct termios *t); typedef int tsw_modem_t(struct tty *tp, int sigon, int sigoff); -typedef int tsw_mmap_t(struct tty *tp, vm_offset_t offset, - vm_paddr_t * paddr, int nprot); +typedef int tsw_mmap_t(struct tty *tp, vm_ooffset_t offset, + vm_paddr_t * paddr, int nprot, vm_memattr_t *memattr); typedef void tsw_pktnotify_t(struct tty *tp, char event); typedef void tsw_free_t(void *softc); @@ -63,6 +65,7 @@ struct ttydevsw { tsw_inwakeup_t *tsw_inwakeup; /* Input can be stored again. */ tsw_ioctl_t *tsw_ioctl; /* ioctl() hooks. */ + tsw_cioctl_t *tsw_cioctl; /* ioctl() on control devices. */ tsw_param_t *tsw_param; /* TIOCSETA device parameter setting. */ tsw_modem_t *tsw_modem; /* Modem sigon/sigoff. */ @@ -70,6 +73,8 @@ struct ttydevsw { tsw_pktnotify_t *tsw_pktnotify; /* TIOCPKT events. */ tsw_free_t *tsw_free; /* Destructor. */ + + void *tsw_spare[4]; /* For future use. */ }; static __inline int @@ -126,6 +131,15 @@ ttydevsw_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) } static __inline int +ttydevsw_cioctl(struct tty *tp, int unit, u_long cmd, caddr_t data, struct thread *td) +{ + tty_lock_assert(tp, MA_OWNED); + MPASS(!tty_gone(tp)); + + return tp->t_devsw->tsw_cioctl(tp, unit, cmd, data, td); +} + +static __inline int ttydevsw_param(struct tty *tp, struct termios *t) { MPASS(!tty_gone(tp)); @@ -142,11 +156,12 @@ ttydevsw_modem(struct tty *tp, int sigon, int sigoff) } static __inline int -ttydevsw_mmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +ttydevsw_mmap(struct tty *tp, vm_ooffset_t offset, vm_paddr_t *paddr, + int nprot, vm_memattr_t *memattr) { MPASS(!tty_gone(tp)); - return tp->t_devsw->tsw_mmap(tp, offset, paddr, nprot); + return tp->t_devsw->tsw_mmap(tp, offset, paddr, nprot, memattr); } static __inline void |