MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / bsd_devsw_init

Function bsd_devsw_init

components/lwp/terminal/freebsd/tty.c:809–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807}
808
809void bsd_devsw_init(struct lwp_ttydevsw *tsw)
810{
811 /* Make sure the driver defines all routines. */
812#define PATCH_FUNC(x) \
813 do \
814 { \
815 if (tsw->tsw_##x == NULL) \
816 tsw->tsw_##x = ttydevsw_def##x; \
817 } while (0)
818
819 PATCH_FUNC(open);
820 PATCH_FUNC(close);
821 PATCH_FUNC(outwakeup);
822 PATCH_FUNC(inwakeup);
823 PATCH_FUNC(ioctl);
824 PATCH_FUNC(cioctl);
825 PATCH_FUNC(param);
826 PATCH_FUNC(modem);
827 PATCH_FUNC(mmap);
828 PATCH_FUNC(pktnotify);
829 PATCH_FUNC(free);
830 PATCH_FUNC(busy);
831#undef PATCH_FUNC
832}
833
834/* release tty, and free the cdev resource */
835static void tty_rel_free(struct lwp_tty *tp)

Callers 1

lwp_tty_create_extFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected