MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ttydev_mmap

Function ttydev_mmap

freebsd/kern/tty.c:684–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684static int
685ttydev_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
686 int nprot, vm_memattr_t *memattr)
687{
688 struct tty *tp = dev->si_drv1;
689 int error;
690
691 /* Handle mmap() through the driver. */
692
693 error = ttydev_enter(tp);
694 if (error)
695 return (-1);
696 error = ttydevsw_mmap(tp, offset, paddr, nprot, memattr);
697 tty_unlock(tp);
698
699 return (error);
700}
701
702/*
703 * kqueue support.

Callers

nothing calls this directly

Calls 2

ttydev_enterFunction · 0.85
ttydevsw_mmapFunction · 0.85

Tested by

no test coverage detected