| 921 | ****************************************************************************/ |
| 922 | |
| 923 | static void tun_dev_uninit(FAR struct tun_device_s *priv) |
| 924 | { |
| 925 | /* Put the interface in the down state */ |
| 926 | |
| 927 | tun_ifdown(&priv->dev); |
| 928 | |
| 929 | work_cancel_sync(TUNWORK, &priv->work); |
| 930 | |
| 931 | /* Remove the device from the OS */ |
| 932 | |
| 933 | netdev_unregister(&priv->dev); |
| 934 | |
| 935 | nxmutex_destroy(&priv->lock); |
| 936 | nxsem_destroy(&priv->read_wait_sem); |
| 937 | nxsem_destroy(&priv->write_wait_sem); |
| 938 | } |
| 939 | |
| 940 | /**************************************************************************** |
| 941 | * Name: tun_close |
no test coverage detected